Skip to content

Allow empty date on initialize #309

Description

@oanacrisan

I'd like to have the possibility to not set an initial date value, but still have the datepicker set to current month when I click on the input to open it. Otherwise, if the date is null, the days are not displayed. And the reason I do not want to set the date with new Date() on initializing is that I do not want the date (of today) displayed in the input, I'd prefer for the input to be populated only after the date is selected.

Maybe in init method have something like this:
const start = startOfMonth(this.date || new Date()); and const end = endOfMonth(this.date || new Date()); so that days get computed even if date is not set.

empty datepicker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions