| 1 | define([ |
| 2 | "dojo/_base/declare", |
| 3 | "dojo/_base/lang", |
| 4 | "dijit/Calendar"], |
| 5 | |
| 6 | function( |
| 7 | declare, |
| 8 | lang, |
| 9 | Calendar){ |
| 10 | |
| 11 | return declare("demo.DatePicker", Calendar, { |
| 12 | |
| 13 | minDate: null, |
| 14 | maxDate: null, |
| 15 | |
| 16 | getClassForDate: function(date, locale){ |
| 17 | if(this.minDate && this.maxDate){ |
| 18 | var cal = this.dateModule; |
| 19 | if(cal.compare(date, this.minDate) >= 0 && cal.compare(date, this.maxDate) <= 0){ |
| 20 | return "Highlighted"; |
| 21 | } |
| 22 | } |
| 23 | return null; |
| 24 | } |
| 25 | |
| 26 | }); |
| 27 | }); |