Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: change jQuery Datepicker to YYMMDD format #44

Open
ricardo-lewis opened this issue Aug 13, 2018 · 12 comments
Open

Enhancement: change jQuery Datepicker to YYMMDD format #44

ricardo-lewis opened this issue Aug 13, 2018 · 12 comments

Comments

@ricardo-lewis
Copy link

Can we please change the datepicker format from MMDDYY to YYMMDD?

This will allow sorting and filtering via >=, <= etc

dateFormat: 'dd-mm-yy',

dateFormat: 'dd-mm-yy',

Proposed change:

dateFormat: 'yy-mm-dd',
@64j
Copy link

64j commented Aug 13, 2018

@ricardo-lewis
System configuration - Interface & Features - Date format
It is necessary to consider the configuration.

@ricardo-lewis
Copy link
Author

ricardo-lewis commented Aug 13, 2018

@64j that's all good and well however it does not help the fact that MTV can only offer sorting via traditional less than < and greater than > etc etc even for date fields.

So when an MTV date value is stored in the database right now, it is stored in the format that the above multitv.js file specifies, which is d/m/y.

This means that we cannot use sorting and filtering on a date field. In order to achieve that I had to alter the core JS file in the manner I described above.

Even if the JS file were to use the System Config, it would still be completely unable to sort and filter unless the config was set to y/m/d.

@ricardo-lewis
Copy link
Author

The alternative is to update MTV to use true MySQL date sorting functions, or to convert and store the dates as UNIX timestamps. But then the timestamps would need to be converted back to d/m/y again in the Manager.

@64j
Copy link

64j commented Aug 13, 2018

@ricardo-lewis
Use the appropriate repository
https://github.com/extras-evolution/multiTV

@ricardo-lewis
Copy link
Author

@64j
Did I post this in the wrong repository? Or are you asking me to do a pull request?

@64j
Copy link

64j commented Aug 13, 2018

@ricardo-lewis
Yes, I ask you to transfer your wishes to the appropriate branch.

@ricardo-lewis
Copy link
Author

@64j
Which is the appropriate branch?

@64j
Copy link

64j commented Aug 13, 2018

@64j 64j closed this as completed Aug 13, 2018
@mnoskov
Copy link

mnoskov commented Aug 13, 2018

@64j Are you sure what you doing? This link leads to the same repository where this issue is created

@64j
Copy link

64j commented Aug 13, 2018

@mnoskov
Точно... ветку не посмотрел))

@ricardo-lewis
I apologize.
You wrote everything correctly

@64j 64j reopened this Aug 13, 2018
@ricardo-lewis
Copy link
Author

@mnoskov

Look, I almost said something but I think what @64j is trying to say is "please submit this as a pull request"

I'll admit I was being lazy since I thought it would be way way way way quicker for the actual developer to change 2 lines of code than it would be for me to make a clean fork of the repo, commit my change, and then submit the pull request with all the requirements met.

But here we are 7 hours later.

@mnoskov
Copy link

mnoskov commented Aug 13, 2018

It is not only to replace 2 lines of code but also to ensure backward compatibility with previous versions.
If you just change these lines, after update, all previous dates wil lbe lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants