Datepicker in the edit/add dialog and datepicker in the search dialog

QuestionsDatepicker in the edit/add dialog and datepicker in the search dialog
Massimo Gagliardi asked 10 years ago

Hi Abu
Premise.
I use the datepicker to manage the dates.
I have this need.
In the database the dates have the format 'Y-m-d', so that is possibile to set the correct order, from the nearest to the farthest or viceversa
Instead in the grid and in the edit/add dialog, with the italian localization of the datepicker, have an italian format:

$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d-m-Y', "opts" => array("changeYear" => true));

because my customer is an italian company.
But in the search dialog I would to have the same format of the database ('Y-m-d') so that is possible to set a correct interval of search.
Is it possible a solution?
Thanks in advance

7 Answers
Abu Ghufran answered 10 years ago

It will use same 'd-m-Y' in search interval too … and it work normal.
You need to criteria in search dialog e.g.
1) date > '01-01-2005'
2) date < '01-01-2008'

Massimo Gagliardi answered 10 years ago

Doesn't work.
If I choose, in the search dialog, a field data, the criterium equal and write in the field control an existing date the search returns all the records and the filter doesn't work.
If I ignore the datepicker calendar, that proposes me an italian format ('d-m-Y'), and I write, in the field control, a data in the format 'Y-m-d' then the filter works.
But this isn't good for my customer.
Another suggestions ?
Thanks in advance

Abu Ghufran answered 10 years ago

Kindly recheck after updating the emailed build.

Massimo Gagliardi answered 10 years ago

I done but doesn't work.

Abu Ghufran answered 10 years ago

Emailed a working deom.

Montemaggiore Sebastian answered 9 years ago

Hello. I have the same problem.

Abu Ghufran answered 9 years ago

Emailed you update.

Your Answer

13 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?