0

Okay, so I have a website I am creating, and I have a calendar made with HTML.

http://screencloud.net/v/b1OD

I want to add raquo's to the left and right of where it says (January 2013), so the user can browse the future and past months. How can I achieve this, along with making it update every month? Anyone have any ideas? It's coded in pure xHTML and CSS.

Long story short: How can I make this update the calendar monthly automatically? Also, how can I browse future and past months? (jQuery maybe?)

Thanks a lot, IntactDev

4

4 回答 4

1

这是一个php日历。http://keithdevens.com/software/php_calendar 希望这会有所帮助。

于 2013-01-28T09:45:57.403 回答
1

我同意@Matthew 的观点——实际上有 100 个……而且一般来说,如果你可以避免重新发明轮子——就这样做。如果您想要一些与您的布局相得益彰的东西,请查看以下内容:

http://amsul.github.com/pickadate.js/themes.htm

于 2013-01-28T02:40:40.870 回答
0

There are literally hundreds of Javascript calendars to choose from. This site here actually has a category for it: http://www.javascriptkit.com/script/cutindex1a.shtml

I suggest googling something like css javascript calendar. That can give you your controls, etc. Then you need to figure out how you will be passing your dates (AJAX calls or page post backs to load the data from different months). Either way, if you start with a JavaScript calendar (and layout) you like, it will get you on the right path.

Note: most calendars you will see will be date-pickers for filling forms, but even these can be easily adapted if you find one you like.

于 2013-01-28T02:28:26.233 回答
0

你看过 AJAX/jQuery 吗?它具有日期选择器的功能:

日期选择器 jQuery UI

Edit1:您可能需要编辑 CSS 以使用自己的配色方案或图像,但我认为它会满足您的所有需求。

编辑2:

您可以使用基于 jquery.com 的 CSS 或在本地下载、更改和引用它们。

<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <script>
  $(function() {
  $( "#datepicker" ).datepicker();
  });
  </script>
</head>
<body>
  <p>Date: <input type="text" id="datepicker" /></p>
</body>
</html>
于 2013-01-28T02:33:40.573 回答