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

Issue #852 Issue while selecting previous month date from FEBRUARY #854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ManishManda
Copy link

if we select previous month date from current month, unexpected date is being displayed

Description

According to moment documentation :
if you chain multiple actions to construct a date, you should start from a year, then a month, then a day etc. Otherwise you may get unexpected results, like when day=31 and current month has only 30 days (the same applies to native JavaScript Date manipulation), the returned date will be the 30th of the current month (see month for more details).

link for reference: https://momentjs.com/docs/#/get-set/date/

i just changed the order of setting moment object date on update of a date by user

Motivation and Context

this change fixes the open issue #852

Checklist

[ ] I have not included any built dist files (us maintainers do that prior to a new release)
[ ] I have added tests covering my changes
[ ] All new and existing tests pass
[ ] My changes required the documentation to be updated
  [ ] I have updated the documentation accordingly
  [ ] I have updated the TypeScript 1.8 type definitions accordingly
  [ ] I have updated the TypeScript 2.0+ type definitions accordingly

@TrekSoft
Copy link

TrekSoft commented Feb 7, 2024

Any reason this PR can't be merged? This is a pretty significant bug in the component.

@TrekSoft
Copy link

TrekSoft commented Feb 7, 2024

Actually I see the repo here hasn't been maintained in more than a year! 😳

Has anyone created a fork with this fix merged in?

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

Successfully merging this pull request may close these issues.

None yet

2 participants