Date Range Selection
Overview
The Date Range Selection Widget is a versatile component designed for Mendix applications, enabling users to select either a single date or a date range. This widget enhances user interaction by providing a convenient and intuitive way to handle date inputs.
Documentation
Typical Usage Scenario
The Date Range Picker Widget allows users to easily select either a single date or a date range within a calendar interface. If the range option is enabled, users can pick both a start date and an end date. If disabled, the widget reverts to a simple single date picker.
This widget is useful for applications that require users to specify a date, such as booking systems, event planning, and project timelines. It solves the problem of selecting a date or date range efficiently, with built-in validation to ensure the end date is after the start date.
Features and Limitations
Features:
- Single Date Picker: When the range option is disabled, only a single date can be selected.
- Date Range Picker: When the range option is enabled, users can select both a start date and an end date.
- Date Validation: Ensures the end date is after the start date.
Limitations:
- Time Zone Considerations: The widget may not handle time zone differences; ensure that the backend handles time zone conversions properly.
- Limited Date Range: The widget does not currently support disabling specific dates or limiting the date range (e.g., no way to restrict users from selecting dates in the past).
- No Recurring Dates: This widget does not support repeating date ranges or intervals.
Installation (Optional)
- Download the widget package.
- In Mendix Studio, navigate to App Explorer > Widgets.
- Right-click the Widgets folder and select Add Widget.
- Upload the widget package (.mpk) and click OK.
- The widget will now be available in the Toolbox. Drag and drop it onto the page where you wish to use it.
Frequently Asked Questions (Optional)
Q: Can I restrict users to only select dates within the next 30 days?
A: Currently, the widget does not support limiting the range of selectable dates. This feature can be added with additional customization or logic in your Mendix project.
Q: How can I change the date format?
A: You can change the date format by configuring the Date Format property within the widget configuration panel.