PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Range selection
  • Changing a time period in a Calendar, Organizer or Scheduler control
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The StartDate property is used to determine and change the start date of the selected time period:
  • in a Calendar control.
  • WINDEVWindows in an Organizer control.
  • WINDEVWindowsAndroidiPhone/iPadMac Catalyst in a Scheduler control.
Versions 18 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
WINDEVLinux This property is now available for WINDEV applications in Linux.
New in version 18
iPhone/iPad This property is now available for iPhone/iPad applications.
WINDEVLinux This property is now available for WINDEV applications in Linux.
iPhone/iPad This property is now available for iPhone/iPad applications.
WINDEVLinux This property is now available for WINDEV applications in Linux.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
AndroidiPhone/iPadMac Catalyst In a Scheduler control, you can only get the start date of the time period.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
AndroidiPhone/iPadMac Catalyst In a Scheduler control, you can only get the start date of the time period.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
AndroidiPhone/iPadMac Catalyst In a Scheduler control, you can only get the start date of the time period.
Example
// Retrieve the selected period (Calendar control)
NbDays is int
NbDays = DateDifference(CAL_Calendar1.StartDate, CAL_Calendar1.EndDate) + 1
Info("Selected time period: from " + ...
DateToString(CAL_Calendar1.StartDate) + ...
" to " + DateToString(CAL_Calendar1.EndDate) + ...
" which means " + NbDays + " days")
Syntax

Determining the start date of the time period Hide the details

<Start date> = <Control used>.StartDate
<Start date>: Character string or Date variable
  • Start date of the time period selected in the control.
    • In a Calendar control, this date is in "YYYYMMDD" format.
    • WINDEVWindowsAndroidiPhone/iPadMac Catalyst In an Organizer or Scheduler control, this date is in "YYYYMMDDHHmmSSCCC" format.
  • Date of the selected day if a day is selected,
  • Empty string ("") if no day is selected.
<Control used>: Control name
Name of the control used:
  • Calendar control,
  • WINDEVWindows Organizer control.
  • WINDEVWindowsAndroidiPhone/iPadMac Catalyst Scheduler control.

Changing the start date of the time period Hide the details

<Control used>.StartDate = <New date>
<Control used>: Control name
Name of the control used:
  • Calendar control,
  • WINDEVWindows Organizer control.
  • WINDEVWindowsAndroidiPhone/iPadMac Catalyst Scheduler control.
<New date>: Character string or Date variable
Start date of the time period to be selected in the control.
  • In a Calendar control, this date is in "YYYYMMDD" format.
  • WINDEVWindows In an Organizer or Scheduler control, this date is in "YYYYMMDDHHmmSSCCC" format.
Remarks

Range selection

To select a time period :
  • in a Calendar control, " Range selection" must be selected in the "Details" tab.
  • WINDEVWindows in an Organizer control, the option "Allow time range selection" must be selected in the "Details" tab.
  • WINDEVWindows in a Scheduler control, the option "Allow time range selection" must be selected in the "Details" tab.

Changing a time period in a Calendar, Organizer or Scheduler control

To change the start date of a selected time period, specify the start date (StartDate property) and the end date (EndDate property). When the start date is changed:
  • the end date is automatically deselected.
  • the end date has to be selected (programmatically or by clicking a control date).
To change the end date of a selected time period, simply use the EndDate property: the time period changes automatically.

Special cases

  • The end date of a time period can be identified and changed with the EndDate property.
  • The StartDate property returns the start date of the time period in chronological order. Therefore, if the end date was selected before the start date, the StartDate property returns the last selected date.
  • AndroidiPhone/iPadMac Catalyst In a Scheduler control, the StartDate property can only be used to get the start date of the time period. The date cannot be changed.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment