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

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 #4394

Commits on Nov 28, 2023

  1. fix: Trigger onCalendarClose and onClose event when the same date is …

    …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
    Balaji Sridharan committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    e3d65b2 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Configuration menu
    Copy the full SHA
    cc49198 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2023

  1. ✨ Add getMidnightDate and isDateBefore helpers and test cases

    Issue No: Hacker0x01#4076
    Balaji Sridharan committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    cd9fb9d View commit details
    Browse the repository at this point in the history
  2. 🔨 Reuse the shared helper isBeforeDate to compare the dates based on …

    …it's midnight time
    
    Hacker0x01#4394 (review)
    Closes: Hacker0x01#4076
    Balaji Sridharan committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    d2e7531 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2024

  1. feature: Update the isDateBefore to throw an exception when either of…

    … the received dates are invalid
    
    Instead of returning false, throw an exception
    Balaji Sridharan committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    c1ae2fa View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into issue-4076/fix/emit-onCalendarClose-onsame-r…

    …ange-select
    Balaji Sridharan committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    0188371 View commit details
    Browse the repository at this point in the history