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

Date & Month defaulting to current month and Date #79

Closed
nagasudhakarch opened this issue Apr 10, 2021 · 5 comments
Closed

Date & Month defaulting to current month and Date #79

nagasudhakarch opened this issue Apr 10, 2021 · 5 comments

Comments

@nagasudhakarch
Copy link

in any of the Date formats if the date & months entered as ZEROs, the date & month defaulting to current.
For ex-

  1. date format is dd.mm.yyyy
  2. entered date as 00.00.2010.
  3. date automatically changing to 10.04.2010 on leaving the field (month & dates are defaulted to current month and date).

Issue is happening here (https://kekeh.github.io/angular-mydatepicker/) also.

@kekeh
Copy link
Owner

kekeh commented Apr 10, 2021

Hello @nagasudhakarch

Try to set the inputFieldValidation option to false.

@nagasudhakarch
Copy link
Author

Hi kekeh,
I tried that option but no luck.
With inputFieldValidation option in the input field it is showing 00.00.2010 only. But the control value is getting changed to 04.11.2010.
Please check sample at - https://stackblitz.com/edit/angular-puxw3k?file=src%2Fapp%2Fapp.component.html

@kekeh
Copy link
Owner

kekeh commented Apr 11, 2021

Hello @nagasudhakarch

I fixed the bug. Install new version of the component: 0.11.2.

Try fixed version here: https://stackblitz.com/edit/angular-2oljde?file=src%2Fapp%2Fapp.component.ts

Now you can keep default value of inputFieldValidation.

@nagasudhakarch
Copy link
Author

Hi Kekeh,
The fix is working fine. Thank you for the fix.
But I found one more issue, if I make the inputFieldValidation option false and enter date manually dateChanged event not getting triggered even for valid Date.

Thanks,
Sudhakar

@kekeh
Copy link
Owner

kekeh commented Apr 14, 2021

If you want that dateChanged is triggered on blur event of input box you have to set inputFieldValidation to true.

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

2 participants