Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#restricting").datepicker({
- yearRange: "-20:+0", // this is the option you're looking for
- showOn: "both",
- buttonImage: "templates/images/calendar.gif",
- buttonImageOnly: true
- });
- "$(".selector").datepicker({ beforeShowDay: nationalDays})
- natDays = [[1, 26, 'au'], [2, 6, 'nz'], [3, 17, 'ie'], [4, 27, 'za'],
- [5, 25, 'ar'], [6, 6, 'se'], [7, 4, 'us'], [8, 17, 'id'], [9, 7,
- 'br'], [10, 1, 'cn'], [11, 22, 'lb'], [12, 12, 'ke']];
- function nationalDays(date) {
- for (i = 0; i < natDays.length; i++) {
- if (date.getMonth() == natDays[i][0] - 1 && date.getDate() ==
- natDays[i][1]) {
- return [false, natDays[i][2] + '_day'];
- }
- }
- return [true, ''];
- }
- $( ".datefield" ).datepicker({
- changeMonth: true,
- changeYear: true,
- yearRange:-90:+0
- });
- .au_day {
- text-indent: -9999px;
- background: #eee url(au.gif) no-repeat center;
- }
Add Comment
Please, Sign In to add comment