Changeset 2639
- Timestamp:
- Oct 2, 2008, 8:51:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/template/goto/include/datepicker.inc.tpl
r2635 r2639 1 1 {* $Id$ *} 2 {known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.datepicker.js"} 2 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"} 4 {known_script id="jquery.ui.datepicker" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.datepicker.packed.js"} 3 5 {known_script id="jquery.ui.datepicker-$lang_info.code" src=$ROOT_URL|@cat:"template-common/lib/ui/i18n/ui.datepicker-"|@cat:$lang_info.code|@cat:".js"} 4 6 … … 31 33 d = array_date[2]; 32 34 33 var daysInMonth = 32 - new Date($(year).val(), $(month).val() - 1, 32).getDate();34 35 $(day + " option").attr("disabled", "");36 $(day + " option:gt(" + (daysInMonth) +")").attr("disabled", "disabled");37 38 if ($(day).val() > daysInMonth) {39 $(day).val(daysInMonth);40 }41 42 35 $(linked_date).val(pwg_get_fmt_datepicker(day, month, year)); 43 36 44 cancel = false;45 37 if ((min_linked_date != null) && ($(min_linked_date).datepicker("getDate") != null)) 46 38 { … … 51 43 cancel = ($(max_linked_date).datepicker("getDate") < $(linked_date).datepicker("getDate")); 52 44 } 53 45 else 46 { 47 cancel = false; 48 } 49 54 50 if (cancel) 55 51 { … … 59 55 // check again 60 56 pwg_check_date(); 57 } 58 else 59 { 60 var daysInMonth = 32 - new Date($(year).val(), $(month).val() - 1, 32).getDate(); 61 $(day + " option").attr("disabled", ""); 62 $(day + " option:gt(" + (daysInMonth) +")").attr("disabled", "disabled"); 61 63 } 62 64 } … … 83 85 else 84 86 { 85 console.log("none");86 87 return {}; 87 88 } … … 118 119 pwg_check_date(); 119 120 }); 121 122 // In order to desable element of list 123 pwg_check_date(); 120 124 }); 121 125
Note: See TracChangeset
for help on using the changeset viewer.