diff options
author | Keith Wood <kbwood.au@gmail.com> | 2008-06-11 10:27:39 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2008-06-11 10:27:39 +0000 |
commit | 84f453e424a95b122b745c28d05ab9ff37c39da2 (patch) | |
tree | 43f9511428d6b783ef2a59d9812c539b21e04241 /demos/functional/templates/ui.datepicker.dbd.html | |
parent | 9aeec7f04a6a80ab6dc32710e38eca46c7bdddf0 (diff) | |
download | jquery-ui-84f453e424a95b122b745c28d05ab9ff37c39da2.tar.gz jquery-ui-84f453e424a95b122b745c28d05ab9ff37c39da2.zip |
More datepicker demonstrations
Diffstat (limited to 'demos/functional/templates/ui.datepicker.dbd.html')
-rw-r--r-- | demos/functional/templates/ui.datepicker.dbd.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/demos/functional/templates/ui.datepicker.dbd.html b/demos/functional/templates/ui.datepicker.dbd.html new file mode 100644 index 000000000..39bc6ffca --- /dev/null +++ b/demos/functional/templates/ui.datepicker.dbd.html @@ -0,0 +1,35 @@ +<input type="text" size="10" value="" id="dayByDay"/>
+<style type="text/css">
+.ar_day { color: white !important; background: #eee url(templates/images/ar.gif) no-repeat center !important; }
+.au_day { color: blue !important; background: #eee url(templates/images/au.gif) no-repeat center !important; }
+.br_day { color: green !important; background: #eee url(templates/images/br.gif) no-repeat center !important; }
+.cn_day { color: red !important; background: #eee url(templates/images/cn.gif) no-repeat center !important; }
+.id_day { color: white !important; background: #eee url(templates/images/id.gif) no-repeat center !important; }
+.ie_day { color: white !important; background: #eee url(templates/images/ie.gif) no-repeat center !important; }
+.ke_day { color: red !important; background: #eee url(templates/images/ke.gif) no-repeat center !important; }
+.lb_day { color: white !important; background: #eee url(templates/images/lb.gif) no-repeat center !important; }
+.nz_day { color: blue !important; background: #eee url(templates/images/nz.gif) no-repeat center !important; }
+.se_day { color: blue !important; background: #eee url(templates/images/se.gif) no-repeat center !important; }
+.us_day { color: white !important; background: #eee url(templates/images/us.gif) no-repeat center !important; }
+.za_day { color: green !important; background: #eee url(templates/images/za.gif) no-repeat center !important; }
+</style>
+<script type="text/javascript">
+var 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, ''];
+}
+
+function highlightToday(date, inst) {
+ var today = new Date();
+ today = new Date(today.getFullYear(), today.getMonth(), today.getDate());
+ return $.datepicker.dateStatus(date, inst) +
+ (today.getTime() == date.getTime() ? ' (today)' : '');
+}
+</script>
\ No newline at end of file |