File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed
Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 192192 min = parseDate ( min || conf . yearRange [ 0 ] * 365 ) ;
193193 max = parseDate ( max || conf . yearRange [ 1 ] * 365 ) ;
194194
195+
195196 // check that language exists
196197 if ( ! labels ) { throw "Dateinput: invalid language: " + conf . lang ; }
197198
441442
442443 setValue : function ( year , month , day ) {
443444
445+
444446 var date ;
445447
446448 if ( parseInt ( month , 10 ) >= 0 ) {
450452 day = integer ( day ) ;
451453 date = new Date ( year , month , day ) ;
452454
453- } else {
454-
455+ } else {
455456 date = year || value ;
456- year = date . getYear ( ) % 100 + 2000 ;
457+ year = date . getYear ( ) + 1900 ;
457458 month = date . getMonth ( ) ;
458459 day = date . getDate ( ) ;
459460 }
460461
462+
461463 // roll year & month
462464 if ( month == - 1 ) {
463465 month = 11 ;
Original file line number Diff line number Diff line change 1+
2+ < script src ="../js/jquery-1.4.2.js "> </ script >
3+ < script src ="../../src/dateinput/dateinput.js "> </ script >
4+
5+ < link rel ="stylesheet " type ="text/css " href ="skin1.css "/>
6+
7+
8+ <!-- HTML5 date input -->
9+ < input type ="date " name ="mydate " />
10+
11+ <!-- make it happen -->
12+ < script >
13+ var begdat = new Date ( 1980 , 1 , 1 ) ;
14+ var mindat = new Date ( 1940 , 1 , 1 ) ;
15+ var maxdat = new Date ( 1992 , 1 , 1 ) ;
16+
17+
18+ $ ( ":date" ) . dateinput ( { value : begdat , max : maxdat , min : mindat } ) ;
19+ </ script >
20+
21+
22+
You can’t perform that action at this time.
0 commit comments