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

DateTimePicker: Min Date is not validated correctly #344

Open
desmondblue opened this issue Sep 12, 2024 · 1 comment
Open

DateTimePicker: Min Date is not validated correctly #344

desmondblue opened this issue Sep 12, 2024 · 1 comment
Labels
area: datetimepicker Issues about datetimepicker question Further information is requested

Comments

@desmondblue
Copy link

Thanks for the repository
In DateTimePicker for the type "date" the minimum date is not getting validated correctly.
The current validation validates the actual date vs the minimum date(timestamp) now due to this additional timestamp comparisson to a date without timestamp. The validations fails to go through and we get an error.

I am currently using the latest v17 extensions library.

mtxDatetimepickerMin 
{min: Moment, actual: Moment}
actual
: 
Moment {_isAMomentObject: true, _i: '2024-09-12', _f: 'YYYY-MM-DD', _isUTC: false, _pf: {…}, …}
min
: 
Moment {_isAMomentObject: true, _i: '2024-09-12T12:53:13.009Z', _f: 'YYYY-MM-DDTHH:mm:ss.SSSSZ', _tzm: 0, _isUTC: false, …}
[[Prototype]]
: 
Object

A suggestion would be to do the min and max date validation based on the type of the input selected.

@nzbin nzbin added question Further information is requested area: datetimepicker Issues about datetimepicker labels Sep 12, 2024
@nzbin
Copy link
Member

nzbin commented Sep 14, 2024

Can you provide a online demo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: datetimepicker Issues about datetimepicker question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants