Date & Date Range
📅 Date & Date Range Components in Lowcoder
Lowcoder offers intuitive and customisable components for date selection, enabling users to seamlessly incorporate date inputs into their applications.
📆 Date Component
The Date component allows users to select a single date from a calendar interface.
🔧 Key Features
User-Friendly Interface: Provides a calendar pop-up for easy date selectin.
Customizable Format: Supports various date formats to match application requiremens.
Data Binding: Easily bind the selected date to other components or queries within the ap.
Event Handling: Trigger actions based on user interactions, such as date selection changs.
🛠 Configuration Options
Default Date: Set an initial date vaue.
Minimum and Maximum Dates: Restrict selectable dates within a specific rage.
Disabled Dates: Specify dates that should be unselectale.
Placeholder Text: Provide guidance when no date is seleced.
⚙️ Integration Tips
Formatting: Utilize Day.js, which is integrated into Lowcoder, for date formatting and manipulation. For examle:
Event Handling: Use event handlers to perform actions when the date value chanes.
Components Playground
On Component Playground, you can interact with the Date component and explore it's Properties, Events and Methods. Play with different Styling properties to see the effect on the Date component.
Components Auto-Docs
In the Auto-Docs of Date component, we have shown how to use different properties of the Date component. It also includes the Styling properties of the Date component.
📅📅 Date Range Component
The Date Range component enables users to select a start and end date, facilitating the selection of a date interval.
🔧 Key Features
Dual Date Selection: Allows selection of both start and end dates.
Preset Ranges: Optionally provide quick selection options like "Last 7 Days" or "This month".
Data Binding: Bind the selected date range to other components or queries.
Event Handling: Trigger actions based on changes to the selected date range.
🛠 Configuration Options
Default Range: Set initial start and end dates.
Minimum and Maximum Dates: Define the allowable range for selection.
Disabled Dates: Specify dates that should be unselectable within the range.
Separator: Customize the separator between start and end dates in the display.
⚙️ Integration Tips
Formating: Use Day.js for formatting both start and end dates. For example:
Event Handing: Implement event handlers to respond to changes in the selected date range.
Components Playground
On Component Playground, you can interact with the Date Range component and explore it's Properties, Events and Methods. Play with different Styling properties to see the effect on the Date Range component.
Components Auto-Docs
In the Auto-Docs of Date Range component, we have shown how to use different properties of the Date Range component. It also includes the Styling properties of the Date Range component.
🔗 Additional Resources
Properties of the Date & Date Range Components
These properties are accessible in {{ }} notations, as well as in JavaScript Queries.
value
String
Returns the String containing Date value of the Date component
hidden
Boolean
Returns True or False based on whether the component is hidden or not
disabled
Boolean
Returns True or False based on whether the component is disabled or not
invalid
Boolean
Returns True or False based on whether the component is valid or not
formattedValue
String
Returns the String containing Full Date value ( Date + Time + Time Zone offset ) of the Component
timestamp
String
Returns the Timestamp value of the Date component
timeZone
Object
Returns TimeZone object, which contains the Name, Offset and TimeZone properties for the Component
start
String
Returns the String containing the Start Date value of the Date Range component
end
String
Returns the String containing the End Date value of the Date Range component
startTimestamp
String
Returns the String containing the Start Timestamp value of the Date Range component
endTimestamp
String
Returns the String containing the End Timestamp value of the Date Range component
formattedStartValue
String
Returns the String containing Full Start Date value ( Date + Time + Time Zone offset ) of the Date Range Component
formattedEndValue
String
Returns the String containing Full End Date value ( Date + Time + Time Zone offset ) of the Date Range Component
Events
Events give you the ability to trigger further actions (with Event-Handlers).
Change
Triggers, when a User make any"changes" to the Component
Focus
Triggers, when a User "Clicks" on the Component
Blur
Triggers, when a User Clicks outside of the Component i.e, defocuses the component.
Methods
You have the capability to engage with components via their respective methods, which can be accessed by their designated names within any segment where JavaScript is utilized. Additionally, these components can be activated through the 'Control Component' action, which is triggered in response to specific events.
setValue():
date1.setValue() method sets the Date's Value property, which gets selected in the Date component.
clearValue() :
date1.clearValue() clears the Date's Value property and empties the selected value from the Date component.
resetValue() :
date1.resetValue() method resets the Date's value property to the default value of the Date component.
setDefaultValue():
date1.setDefaultValue() method sets the Date's DefaultValue property, which gets selected as default in the Date component.
clearDefaultValue() :
date1.clearDefaultValue() clears the Date's DefaultValue property and empties the default value from the Date component.
resetDefaultValue() :
date1.resetDefaultValue() method resets the Date's Default value property to the default value of the Date component.
setUserTimeZone() :
date1.setUserTimeZone() method sets the Date's TimeZone object property, which sets the TimeZone of the Date component.
clearUserTimeZone() :
date1.clearUserTimeZone() clears the Date's TimeZone object property and empties the selected/current value of the TimeZone property from the Date component.
resetUserTimeZone() :
date1.resetUserTimeZone() method resets the Date's TimeZone object property to the default value of the TimeZone property of the Date component.
setStart() :
dateRange1.setStart() method sets the Date Range's Start Value property, which sets the Start date of the Date Range component.
clearStart() :
dateRange1.clearStart() clears the Date Range's Start Value property and empties the Start Date value from the Date Range component.
resetStart() :
dateRange1.resetStart() method resets the Date Range's Start value property to the default Start value of the Date Range component.
setEnd() :
dateRange1.setEnd() method sets the Date Range's End Value property, which sets the End date of the Date Range component.
clearEnd() :
dateRange1.clearEnd() clears the Date Range's End Value property and empties the End Date value from the Date Range component.
resetEnd() :
dateRange1.resetEnd() method resets the Date Range's End value property to the default End value of the Date Range component.
setRange() :
dateRange1.setRange() method sets the Range of the Date Range component, i.e, it sets the Start and End dates of the Date Range component.
setDefaultStart() :
dateRange1.setDefaultStart() method sets the Date Range's DefaultStart Value property, which sets the Default Start date of the Date Range component.
clearDefaultStart() :
dateRange1.clearDefaultStart() clears the Date Range's DefaultStart Value property and empties the Default Start Date value from the Date Range component.
resetDefaultStart() :
dateRange1.resetDefaultStart() method resets the Date Range's DefaultStart value property to the default Start value of the Date Range component.
setDefaultEnd() :
dateRange1.setDefaultEnd() method sets the Date Range's DefaultEnd Value property, which sets the Default End date of the Date Range component.
clearDefaultEnd() :
dateRange1.clearDefaultEnd() clears the Date Range's DefaultEnd Value property and empties the Default End Date value from the Date Range component.
resetDefaultEnd() :
dateRange1.resetDefaultEnd() method resets the Date Range's DefaultEnd value property to the default End value of the Date Range component.
clearAll() :
dateRange1.clearAll() clears all the Properties of the Date Range component.
resetAll() :
dateRange1.resetAll() reset all the Properties of the Date Range component.
setUserRangeTimeZone() :
date1.setUserRangeTimeZone() method sets the Date Range's TimeZone object property, which sets the TimeZone of the Date Range component.
clearUserRangeTimeZone() :
date1.clearUserRangeTimeZone() clears the Date Range's TimeZone object property and empties the selected/current value of the TimeZone property from the Date Range component.
resetUserRangeTimeZone() :
date1.resetUserRangeTimeZone() method resets the Date's TimeZone object property to the default value of the TimeZone property of the Date Range component.
Last updated
Was this helpful?