Skip to content

(feature suggestion) Date Range restrict max based on a relative reference property/function. #7

Description

@mreis1

When calendar is in range mode, a second property could be defined such as "relativeRangeMax". This property accepts the first picked date and calculates the limit to the second date in the range field.

Conceptually
A => 01-01-2015
B => 31-01-2015

User picks
C => 20-01-2015

The plugins says relativeRangeMax: '+10d'
then the max is defined to be 30-01-2015

Because C + '+10d' is smaller than the global maxDate the value is accepted. Otherwise the range would be set to 31-01-2015 which is the global maxDate

This relativeRangeMax could also be a function that accepts the first selected date and passes to the function which interally defined the new global date if necessary and returns the new maxDate if smaller than the plugin maxDate property


A second and probably good feature would be to create a custom event that fires once a dateRange pick is finished. Why? In inline calendars I could not figure out when to handle the new value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions