File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 463463
464464 setValue : function ( year , month , day ) {
465465
466+
467+
466468 var date = integer ( month ) >= - 1 ? new Date ( integer ( year ) , integer ( month ) , integer ( day || 1 ) ) :
467469 year || value ;
468-
470+
469471 if ( date < min ) { date = min ; }
470472 else if ( date > max ) { date = max ; }
473+
474+ // date given as ISO string
475+ if ( typeof year == 'string' ) { date = parseDate ( year ) ; }
471476
472477 year = date . getFullYear ( ) ;
473478 month = date . getMonth ( ) ;
Original file line number Diff line number Diff line change 99
1010<!-- make it happen -->
1111< script >
12- $ ( ":date" ) . dateinput ( {
13- selectors : true ,
14- yearRange : [ - 10 , 10 ]
12+ var api = $ ( ":date" ) . dateinput ( { selectors : true , yearRange : [ - 10 , 10 ] } ) . data ( "dateinput" ) ;
1513
16- } ) . data ( "dateinput" ) ;
14+ api . setValue ( '2012-10-10' ) ;
1715</ script >
1816
You can’t perform that action at this time.
0 commit comments