File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,15 @@ widget = $.widget( "ui.datepicker", {
53
53
} ,
54
54
55
55
_create : function ( ) {
56
- var globalize ;
57
56
this . suppressExpandOnFocus = false ;
58
57
59
58
this . _setLocale ( this . options . locale ) ;
60
59
61
- // FIXME: can we use Date instead?
62
60
if ( $ . type ( this . options . max ) === "string" ) {
63
- this . options . max = globalize . parseDate ( this . options . max , { pattern : "yyyy-MM-dd" } ) ;
61
+ this . options . max = this . options . locale . parseYMD ( this . options . max ) ;
64
62
}
65
63
if ( $ . type ( this . options . min ) === "string" ) {
66
- this . options . min = globalize . parseDate ( this . options . min , { pattern : "yyyy-MM-dd" } ) ;
64
+ this . options . min = this . options . locale . parseYMD ( this . options . min ) ;
67
65
}
68
66
69
67
this . _createCalendar ( ) ;
@@ -290,6 +288,9 @@ widget = $.widget( "ui.datepicker", {
290
288
} ,
291
289
parse : function ( stringDate ) {
292
290
return globalize . parseDate ( stringDate , { date : "short" } ) ;
291
+ } ,
292
+ parseYMD : function ( stringDate ) {
293
+ return globalize . parseDate ( stringDate , { pattern : "yyyy-MM-dd" } ) ;
293
294
}
294
295
} ;
295
296
}
You can’t perform that action at this time.
0 commit comments