Fix #4076: Trigger onCalendarClose event and onChange even when the same date is selected as the start and the end date in a date range#8
Merged
balajis-qb merged 6 commits intomainfrom Jan 16, 2024
Conversation
e4e9afb to
a539b10
Compare
…selected for a date range This commit resolves the following issue 1. Previously we were checking whether to emit the onCalendarClose close or not using the isBefore function but the issue is the startDate has the default time added, but the endDate we get from the calendar component doesn't has any time added to it, hence the isBefore check was failing as the startDate with some time is always ahead of the same date (endDate) without time 2. Similarly we were using the same isBefore function to decide whether to consider the date as startDate or endDate for onChange event handler, as the isBefore will fail because of the few milli-sec difference and the onChange call will fail. As a result the end date (the currently selected date) is being considered as the startDate, hence we need to once again select the endDate value Closes: Hacker0x01#4076
a539b10 to
e3d65b2
Compare
added 5 commits
November 29, 2023 11:01
…it's midnight time Hacker0x01#4394 (review) Closes: Hacker0x01#4076
… the received dates are invalid Instead of returning false, throw an exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: Hacker0x01#4076
This ticket fixes the following issues
isBeforecheck was failing as the startDate with some time is always ahead of the same date (endDate) without time2. Similarly we were using the same isBefore function to decide whether to consider the date as startDate or endDate for
onChangeevent handler, as the isBefore will fail because of the few milli-sec difference and the onChange call will fail. As a result, the end date (the currently selected date) is being considered as the startDate, hence we need to once again select the endDate valueI fixed the above issues by only comparing the date and not considering the time.