The Range Date Picker is designed to help users quickly and visually choose a range of dates from a calendar component. The intention is that this date is sent from the Range Date Picker component to a Text, or Text Entry component inside a form. The Range Date Picker can be used in either simple mode (pressing on the date picker selects start/end dates), or in advanced mode (with separate button components used to select the start and end dates).
Features
- Customizable colors, icon images, font styles.
- Date can be saved in different formats
- Dates positioned in correct days of the week
- Knows when a leap year is.
- A month/year selector section to speed up Date Picking (hit the header text)
- Can select dates over a range of months, or even years.
- An advanced option, which allows the start/end dates to be selected with buttons.
Sub Component Overview
The date picker is comprised of several sub components:
This is the header, which displays the current date picker’s month & year. The arrow icons will change it to the previous/next month. The text is fully customizable with Umajin font styles, the icons can be changed, and the background color can be changed.
This is the days of the week header. It indicates the days of the week for the columns of dates below.
This is the dates mode. It stores all of the dates, correctly placed beneath the corresponding day for that month. It highlights the current date, seen as dark green in the image above (the month and year must also be same). There exist ‘Start’, ‘End’, ‘Inbetween’ and ‘Same’ selection states for the dates. All have their own customizable icons & font colors. In the image above, they are all the same icon and color. There is one ‘global’ font style used for all dates here, only the colors can be changed for the selected sections.
This is the month/year selection mode, which can be viewed by clicking on the header. This saves the user from clicking the arrow icons several times to reach a distant date. The arrow icons change which year is selected. These icons are customizable. When the user presses on a month, it will jump into that month in dates mode. The font styles for the months & icons can be changed here. Every other property is shared with the date mode.
How to use it
In simple mode, the first press on a date will select the start date. Pressing again will select the end date (this can be the same date).
When an arrow in the header is pressed, it will change to the previous/next month. It does NOT select a new date. The previously selected date is still stored. When a user presses on the Month/year section, it opens up a section which lets the user quickly choose the month. Pressing the arrows in this section will change the year. Choosing a month in this section will change the month & year, and switch back to the dates view.
The selected date can be saved to text or text entry using the Range date picker’s custom actions. The full date range and separate start/end dates can be saved to either text or text entry components.
The full date range is saved in the format dd/mm/yyyy-dd/mm/yyyy
Start/end dates are saved in the format dd/mm/yyyy
The default date save format is dd/mm/yyyy, this can be changed in the advanced properties section in the Range Date Picker
An example implementation (simple mode)
Imagine a range of dates is required on a form. To achieve this, when a date field on that form is pressed, it navigates to a new page containing just the Range Date Picker. The user then selects a start and end date. When end date is selected, it returns to the form page and the date is saved into the date field.
- Create a form component, and add in a ‘Date’ field which consists of a text component, and in image(or nine slice) background image of a border.
- Insert a Range Date Picker in its own page. Add an OK and CANCEL button. I’ve placed a white rectangle behind the calendar, so the calendar doesn’t look stretched.
- Go back to the form and bind an ‘on press’ action to the ‘Date’ field (bind to either the text or the image). Choose the action which shows a page. Choose to show the page with the date picker.
- Go back to the page with the date picker and on the ‘On End Selected’ event
- Use a show page action to return to the page with the form.
- Choose the ‘Formatted Date to Text’ action, selecting the date picker and the text on the page with the form.
- Finished! The date can now be selected and the form can be submit.
An example implementation (advanced mode)
This is a feature that requires additional buttons to help achieve. The intention is to have something like this:
- Select the ‘Select dates with start/end select buttons’ property, which can be found under Advanced Calendar Options at the end of the Properties panel.
- Add the ‘Select a Start Date’ and ‘Show Page…’ actions to the Start Date text/button . When pressed, it will set the state of the calendar to “select a start date” mode, and jump to that page.
- On the date range picker, set up the ‘Range Date Picker’s Start Date to Text’ action, as well as a ‘Show Page’ action to return to the page with the form on it.
- When the user selects a first date, the date will be sent to the text field in the form, then the page will be displayed again, ready for the end date to be selected.
- Add the ‘Select an End Date’ and ‘Show Page’ actions to the End Date text/button. When pressed, it will set the state of the calendar to “select an end date” mode, and jump to that page.
- On the date range picker, set up the ‘Range Date Picker’s End Date to Text’ action, as well as a ‘Show Page’ action to return to the page with the form on it.
- When the user selects an end date, the date will be sent to the text field in the form, then the page will be displayed again.
Properties for Range Date Picker Component
Name | When components are placed on a page they appear highlighted blue in the scene tree and can be renamed by double clicking in this panel and typing the new name. Components can also be set to be visible/invisible on the page, using the ‘eye’ icon on this panel. |
Position and Size | Sets position and size. As long as measurements are maintained as percentages it deals automatically with dynamic layout and resizing for different devices and orientations. You can use millimeters to control aspects of size like width or height on order to create a component thats size will be maintained across devices. |
Header Font Style | The properties below allow you to set the font style for the header. |
Base Style | The dropdown will display all the styles you have set in the Styles Inspector. Whichever style you have selected will populate the properties below. If you alter any of the properties below for a specific use on a page, then clicking the Refresh arrow will revert the style back to its original state. Create Style – opens the Styles Inspector so you can create a new style. The new style will be added to the dropdown. Organize Style – opens the Styles Inspector. |
Font Size | Set font size using plus and minus buttons. |
Font Color | The color preview shows the color picker. Move around the color pad to select your color you want. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Opacity | Set how opaque the text will display on a scale of 0 to 1, with 0 being totally translucent. |
Font | The drop down displays all the fonts you have in your project. Select the font you want to use. |
Tracking | Use this property to adjust the distance between your text characters. |
Week Days Font Style | The properties in this section allow you to set the font style for the days of the week header. |
Dates Font Style | The properties in this section allow you to set the font style for the dates. |
Months Font Style | The properties in this section allow you to set the font style for the months in the month selection mode. |
Selected Date Icons | The properties in this section allow you to set the properties for the selected date icons. |
Start Select Image | Select the image to use as an icon for the start date |
Start Select Images Scale | This property changes the scale of the start select image components. |
Start Select Images Alpha | Set how opaque the image will display on a scale of 0 to 1, with 0 being totally translucent. |
End Select Image | Select the image to use as an icon for the end date |
End Select Images Scale | This property changes the scale of the end select image components. |
End Select Images Alpha | Set how opaque the image will display on a scale of 0 to 1, with 0 being totally translucent. |
Inbetween Image | Select the image to use as an icon for the inbetween date |
Inbetween Images Scale | This property changes the scale of the inbetween image components. |
Inbetween Images Alpha | Set how opaque the image will display on a scale of 0 to 1, with 0 being totally translucent. |
Same Start & End Image | Select the image to use as an icon for the same start & end date |
Same Start & End Select Images Scale | This property changes the scale of the same start & end select image components. |
Same Start & End Select Images Alpha | Set how opaque the image will display on a scale of 0 to 1, with 0 being totally translucent. |
Selected Date Font Colors | The properties in this section allow you to set the font color and opacity properties for the selected dates. The selected date uses the font style from Dates Font Style, however it overrides the color property. |
Selected Start Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the selected start date. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Selected End Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the selected end date. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Inbetween Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the inbetween date. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Same Start & End Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the same start & end date. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Selected Month Icon | The properties in this section allow you to set the image and image scale for the selected month. |
Selected Month Background Image | Select an image that will be placed behind the selected month to highlight it. The selected image will attempt to maintain its ratio, however a basic circle or a square shape are recommended. |
Selected Month Image Scale | This property changes the scale of the image component. |
Selected Month Font Color | The properties in this section allow you to set the font and opacity for the selected month. The selected month uses the font style from Months Font Style, however it overrides the color property. |
Selected Month Font Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the selected month. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Current Date/Month Font Colors | The properties in this section allow you to set the font color and opacity for the current date and month. |
Current Date Font Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the current date. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Current Month Font Color | The color preview shows the color picker. Move around the color pad to select the font color you want for the current month. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Background colors | The properties in this section allow you to set the background colors for different sub-sections. |
Header Background Color | The color preview shows the color picker. Move around the color pad to select your color you want for the header. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Days Background Color | The color preview shows the color picker. Move around the color pad to select your color you want for the days of the week background. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Dates Background Color | The color preview shows the color picker. Move around the color pad to select your color you want for the dates background. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Months Background Color | The color preview shows the color picker. Move around the color pad to select your color you want for the months background. It displays with its web hex code at the top and shows the RGB values below. If you know the hex code or RGB numbers you can type it directly into the boxes. |
Arrow Icons | The properties in this section allow you to set the properties for the arrow icons. |
Arrow Left | Select the image to use as an icon on the left of the header |
Arrow Right | Select the image to use as an icon on the right of the header |
Arrow Image Scale | This property changes the scale of the arrow image components. |
Arrow Image Alpha | Set how opaque the image will display on a scale of 0 to 1, with 0 being totally translucent. |
Advanced Calendar Options | The properties in this section allow you to set the date format, and indicate if the advanced mode should be used. |
Date Format | This property sets the format of the date the calendar will use. When submitted via a form, or a date to text action is used, it will save the date in this format. |
Select Dates With Start/End Select Buttons | Selecting this option allows the Date Range Picker to be used in advanced mode. This means that separate buttons are used to select the start and end dates from the Date Picker component. |