File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -381,19 +381,24 @@ public function columnControlSearch(): void
381381
382382 if ($ type === 'date ' ) {
383383 try {
384+ // column control replaces / with - on date value
385+ if ($ mask && str_contains ($ mask , '/ ' )) {
386+ $ value = str_replace ('- ' , '/ ' , $ value );
387+ }
388+
384389 $ value = $ mask ? Carbon::createFromFormat ($ mask , $ value ) : Carbon::parse ($ value );
390+
391+ if ($ logic === 'notEqual ' ) {
392+ $ this ->query ->where (function ($ q ) use ($ columnName , $ value ) {
393+ $ q ->whereDate ($ columnName , '!= ' , $ value )->orWhereNull ($ columnName );
394+ });
395+ } else {
396+ $ this ->query ->whereDate ($ columnName , $ operator , $ value );
397+ }
385398 } catch (\Exception ) {
386399 // can't parse date
387400 }
388401
389- if ($ logic === 'notEqual ' ) {
390- $ this ->query ->where (function ($ q ) use ($ columnName , $ value ) {
391- $ q ->whereDate ($ columnName , '!= ' , $ value )->orWhereNull ($ columnName );
392- });
393- } else {
394- $ this ->query ->whereDate ($ columnName , $ operator , $ value );
395- }
396-
397402 continue ;
398403 }
399404
You can’t perform that action at this time.
0 commit comments