File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
document-management/js/views
product-management/js/views Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,10 @@ define([
149149 author : this . $author . val ( ) ,
150150 tags : this . $tags . val ( ) . replace ( / / g, '' ) ,
151151 content : this . $content . val ( ) ,
152- createdFrom : this . $createdFrom . val ( ) ? date . getDateFromDateInput ( this . $createdFrom . val ( ) ) : null ,
153- createdTo : this . $createdTo . val ( ) ? date . getDateFromDateInput ( this . $createdTo . val ( ) ) : null ,
154- modifiedFrom : this . $modifiedFrom . val ( ) ? date . getDateFromDateInput ( this . $modifiedFrom . val ( ) ) : null ,
155- modifiedTo : this . $modifiedTo . val ( ) ? date . getDateFromDateInput ( this . $modifiedTo . val ( ) ) : null ,
152+ createdFrom : this . $createdFrom . val ( ) ? date . getISODate ( this . $createdFrom . val ( ) ) : null ,
153+ createdTo : this . $createdTo . val ( ) ? date . getISODate ( this . $createdTo . val ( ) ) : null ,
154+ modifiedFrom : this . $modifiedFrom . val ( ) ? date . getISODate ( this . $modifiedFrom . val ( ) ) : null ,
155+ modifiedTo : this . $modifiedTo . val ( ) ? date . getISODate ( this . $modifiedTo . val ( ) ) : null ,
156156 } ;
157157 return query . constructSearchQuery ( data , this . attributes ) ;
158158 }
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ define([
4040 return moment ( value , 'YYYY-MM-DD' ) . toDate ( ) ;
4141 } ,
4242
43+ getISODate : function ( value ) {
44+ return moment ( value , 'YYYY-MM-DD' ) . toISOString ( ) ;
45+ } ,
46+
4347 formatShort : function ( input ) {
4448 return input ? moment ( input ) . format ( 'YYYY-MM-DD' ) : null ;
4549 } ,
Original file line number Diff line number Diff line change @@ -152,10 +152,10 @@ define([
152152 author : this . $author . val ( ) ,
153153 tags : this . $tags . val ( ) . replace ( / / g, '' ) ,
154154 content : this . $content . val ( ) ,
155- createdFrom : this . $createdFrom . val ( ) ? date . getDateFromDateInput ( this . $createdFrom . val ( ) ) : null ,
156- createdTo : this . $createdTo . val ( ) ? date . getDateFromDateInput ( this . $createdTo . val ( ) ) : null ,
157- modifiedFrom : this . $modifiedFrom . val ( ) ? date . getDateFromDateInput ( this . $modifiedFrom . val ( ) ) : null ,
158- modifiedTo : this . $modifiedTo . val ( ) ? date . getDateFromDateInput ( this . $modifiedTo . val ( ) ) : null ,
155+ createdFrom : this . $createdFrom . val ( ) ? date . getISODate ( this . $createdFrom . val ( ) ) : null ,
156+ createdTo : this . $createdTo . val ( ) ? date . getISODate ( this . $createdTo . val ( ) ) : null ,
157+ modifiedFrom : this . $modifiedFrom . val ( ) ? date . getISODate ( this . $modifiedFrom . val ( ) ) : null ,
158+ modifiedTo : this . $modifiedTo . val ( ) ? date . getISODate ( this . $modifiedTo . val ( ) ) : null ,
159159 standardPart : this . $standardPart . filter ( ':checked' ) . val ( ) === 'all' ? null : this . $standardPart . filter ( ':checked' ) . val ( )
160160 } ;
161161 return query . constructSearchQuery ( data , this . attributes ) ;
You can’t perform that action at this time.
0 commit comments