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 Calendar value typings #3517

Closed
wants to merge 1 commit into from
Closed

Commits on Jan 11, 2023

  1. fix Calendar value typings

    Add missing typings for open date ranges. These are necessary when you are using the calendar to select a date range. One end of the range may not be chosen yet. This adds the typing for a fixed size array of size 2.
    
    Optionally, to simplify the code, we can define it separately (this is how I have it in my code):
    ```typescript
    type OpenDateRange = [Date | null | undefined, Date | null | undefined];
    type CalendarValueType = string | Date | string[] | Date[] | OpenDateRange | undefined;
    ```
    Alternatively, `OpenDateRange` could be defined as `(Date | null | undefined )[]`
    jpeletier authored Jan 11, 2023
    Configuration menu
    Copy the full SHA
    0c913ac View commit details
    Browse the repository at this point in the history