Open safatshahin opened 2 years ago
Surely we should change it to use the standard Moodle date/time picker?
I have tried both
Date input is displayed in "dd/mm/yyyy" format on my browser
It looks like the format is depend on browser: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
When I change OS language/locale (not browser's locale) the format changes accordingly. So I guess this is not an issue.
Are you just ignoring my comment above?
Hi @timhunt ,
Sorry if it make you feel being ignored.
Please give me some time to review how large the change will be, given it will be made on MDL-72321
Hi @timhunt ,
I assume what you mean by "moodle date/time picker" is date_selector/date_time_selector https://docs.moodle.org/dev/lib/formslib.php_Form_Definition#date_selector
If that the case, I haven't been able to use the form element in date filter js: https://github.com/catalyst/moodle-MDL-72752/commit/3f31376e9981f5b03834e67381acf24cd5cf519e#diff-4773c935349827c79acbb536dd4f0a7a6183db80c1717ed55c740a607473cff8R33
If you have some time to review the tracker MDL-72321 https://tracker.moodle.org/browse/MDL-72321, you will see that the filters does not use Moodle form. Instead it is Ajax call that renders html input.
I think it would require considerable effort to make 'MoodleQuickForm_date_selector' and 'element-date_selector.mustache' to be usable in the fitler js.
It would be great if you can let me know your idea, and if you know how we can do this.
Thanks
For a back-end developers point-of-view, date_selector only exists in Moodle forms, and yes, you are not using a Moodle form, so that is tricky.
From a user-experience point-of-view, the way you selected dates in Moodle is Moodle's standard date-picker widget.
Users are more important than developers. It's the developers job to give the user a good, consistent, experience. No-one told us that the job we were signing up for was easy.
I don't have time to work out how to solve this particular problem right now. Why not ask in Moodle dev chat?
Hi @timhunt ,
Thanks for you reply.
There is no need to mention this "Users are more important than developers. It's the developers job to give the user a good, consistent, experience. No-one told us that the job we were signing up for was easy." I totally understand it, and I was simply give you some infomation on the issue and asking for the right approach. There is no intention to abandon this.
I would seek for further opinion from you, regards "to give the user a good, consistent, experience.". Does this mean that as long as I can make date filter the same as date_selector form element, it is still acceptable even if I don't re-use date_selector
At other times, I might have time to discuss this, but I am trying to do three other things right now, so, sorry, not today.
No worries. Please let me know once you have time.
Or, you could talk to another Moodle developer.
Yep
Created tracker: https://tracker.moodle.org/browse/MDL-75700
Date is current mm/dd/yyyy change it according to selected zone or dd/mm/yyyy