This repository was archived by the owner on Nov 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -535,10 +535,16 @@ var dataNS = odkmaker.namespace.load('odkmaker.data');
535535 // numeric/date range
536536 if ( ( control . range !== undefined ) && ( control . range !== false ) )
537537 {
538- if ( ! $ . isBlank ( control . range . min ) )
539- constraint . push ( '. >' + ( control . range . minInclusive ? '= ' : ' ' ) + xmlValue ( control . range . min ) ) ;
540- if ( ! $ . isBlank ( control . range . max ) )
541- constraint . push ( '. <' + ( control . range . maxInclusive ? '= ' : ' ' ) + xmlValue ( control . range . max ) ) ;
538+ if ( ! $ . isBlank ( control . range . min ) ) {
539+ var min = xmlValue ( control . range . min ) ;
540+ if ( control . type === 'inputDate' ) min = 'date(' + min + ')' ;
541+ constraint . push ( '. >' + ( control . range . minInclusive ? '= ' : ' ' ) + min ) ;
542+ }
543+ if ( ! $ . isBlank ( control . range . max ) ) {
544+ var max = xmlValue ( control . range . max ) ;
545+ if ( control . type === 'inputDate' ) max = 'date(' + max + ')' ;
546+ constraint . push ( '. <' + ( control . range . maxInclusive ? '= ' : ' ' ) + max ) ;
547+ }
542548
543549 invalidText = 'Value must be between ' + $ . emptyString ( control . range . min , 'anything' ) + ' and ' + $ . emptyString ( control . range . max , 'anything' ) ;
544550 }
You can’t perform that action at this time.
0 commit comments