Rob van der Woude's Scripting Pages

Help text for dialogboxes

(view help text of dialogboxes as plain text)

Help for DateTimeBox class
───────────────────────────

Present a dialog with date and/or time picker, and return the selected date and/or time values


COM ProgID: RobvanderWoude.DateTimeBox


┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                              │
│ Properties        (Note that all properties are string or integer, no booleans, objects or arrays)                                           │
│                                                                                                                                              │
╞══════════════════╤════════════════════════════════════════════════════╤═══════════╤═══════════╤══════════════════════════════════════════════╡
│ Property Name    │ Description                                        │ Mandatory │ Read-Only │ Default (Allowed) Values                     │
╞══════════════════╪════════════════════════════════════════════════════╪═══════════╪═══════════╪══════════════════════════════════════════════╡
│ captioncancel    │ Caption for "Cancel" button                        │ no        │ no        │ Cancel                                       │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ captionok        │ Caption for "OK" button                            │ no        │ no        │ OK                                           │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ culturegui       │ The "culture" used to format date/time in the GUI  │ no        │ no        │ fr-CA                                        │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ culturein        │ The "culture" used to format initial date/time     │ no        │ no        │ fr-CA                                        │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ cultureout       │ The "culture" used to format output date/time      │ no        │ no        │ fr-CA                                        │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateformatgui    │ Date format for GUI, overrides culture             │ no        │ no        │ short date format for culturegui             │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateformatin     │ Date format for initial date, overrides culture    │ no        │ no        │ short date format for culturein              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateformatout    │ Date format for output, overrides culture          │ no        │ no        │ short date format for cultureout             │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateonly         │ Date picker only, no time picker (0=false, 1=true) │ no        │ no        │ 0: show time picker                          │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateseparatorgui │ Date separator used in the GUI                     │ no        │ no        │ determined by culturegui                     │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateseparatorgui │ Date separator used in initial date                │ no        │ no        │ determined by culturein                      │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ dateseparatorgui │ Date separator used in output                      │ no        │ no        │ determined by cultureout                     │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ debuginfo        │ A log of actions for debugging                     │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ earliestdate     │ Earliest date allowed                              │ no        │ no        │ 1-1-0001 00:00:00 (31-12-9999 23:59:59 ..    │
│                  │                                                    │           │           │ 31-12-9999 23:59:59)                         │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ errors           │ List of errors with current settings               │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ fontfamily       │ Font family used in dialog                         │ no        │ no        │ Microsoft Sans Serif                         │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ fontsize         │ Font size used in dialog                           │ no        │ no        │ 10 (6..48)                                   │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ initialdatetime  │ Initial date/time for date/time pickers            │ no        │ no        │ current date/time                            │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ latestdate       │ Latest date allowed                                │ no        │ no        │ 31-12-9999 23:59:59 (1-1-0001 00:00:00 ..    │
│                  │                                                    │           │           │ 31-12-9999 23:59:59)                         │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ left             │ Offset of window from left screen border           │ no        │ no        │ Centered (0..screenwidth - windowwidth)      │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ literal          │ Treat "prompt" as literal string (0=false; 1=true) │ no        │ no        │ 0: interpret "\t" as tab and "\n" as newline │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ localizecaptions │ Use localized button captions    (0=false; 1=true) │ no        │ no        │ 0: English captions                          │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ maxdaysback      │ Maximum number of days back from initial date      │ no        │ no        │ -1 (you can set either earliestdate or       │
│                  │                                                    │           │           │ maxdaysback, but not both)                   │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ maxdaysforward   │ Maximum number of days forward from initial date   │ no        │ no        │ -1 (you can set either latestdate or         │
│                  │                                                    │           │           │ maxdaysback, but not both)                   │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ modal            │ Modal dialog, i.e. always on top (0=false; 1=true) │ no        │ no        │ 1: always on top                             │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ prompt           │ Optional text above controls                       │ no        │ no        │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ selecteddate     │ Date selected in date picker                       │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ selectedtime     │ Time selected in time picker                       │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ selectedweek     │ Week of year for selected date                     │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ selectedweekday  │ Day of week for selected date                      │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeformatgui    │ Time format for GUI, overrides culture             │ no        │ no        │ long time format for culturegui              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeformatin     │ Time format for initial time, overrides culture    │ no        │ no        │ long time format for culturein               │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeformatout    │ Time format for output, overrides culture          │ no        │ no        │ long time format for cultureout              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeonly         │ Time picker only, no date picker (0=false, 1=true) │ no        │ no        │ 0: show date picker                          │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeout          │ Optional dialog timeout in seconds  (0=no timeout) │ no        │ no        │ 0: no timeout                                │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeoutelapsed   │ Timeout elapsed status           (0=false; 1=true) │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeformatgui    │ Time format for GUI, overrides culture             │ no        │ no        │ long time format for culturegui              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeformatin     │ Time format for initial date, overrides culture    │ no        │ no        │ long time format for culturein               │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeformatout    │ Time format for output, overrides culture          │ no        │ no        │ long time format for cultureout              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeseparatorgui │ Time separator used in the GUI                     │ no        │ no        │ determined by culturegui                     │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeseparatorgui │ Time separator used in initial date                │ no        │ no        │ determined by culturein                      │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeseparatorgui │ Time separator used in output                      │ no        │ no        │ determined by cultureout                     │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ title            │ Dialog window title                                │ no        │ no        │ DialogBoxes.dll,  Version 0.18.1.0           │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ top              │ Offset of window from top of screen                │ no        │ no        │ Centered (0..screenheight - windowheight)    │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ Version          │ Show this DLL's version                            │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ windowheight     │ Height of dialog window                            │ no        │ no        │ 135 (135..screenheight)                      │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ windowwidth      │ Width of dialog window                             │ no        │ no        │ 220 (220..screenwidth)                       │
└──────────────────┴────────────────────────────────────────────────────┴───────────┴───────────┴──────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                              │
│ Methods                                                                                                                                      │
│                                                                                                                                              │
╞══════════════════╤════════════════════════════════════════════════════════════════════════════╤══════════════════════════════════════════════╡
│ Method Name      │ Description                                                                │ Requirements                                 │
╞══════════════════╪════════════════════════════════════════════════════════════════════════════╪══════════════════════════════════════════════╡
│ CheckUpdate      │ Check the developer's website for updates                                  │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ Credits          │ Shows credits                                                              │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ Help             │ Returns this help text as plain text, or if optional parameter equals 1,   │                                              │
│                  │ as html                                                                    │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ ListProperties   │ Returns a list of this class' properties as key=value pairs (1 per line)   │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ SampleCode       │ Returns VBScript sample code for this dialog                               │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ Show             │ Presents a date/time picker dialog based on the current property values,   │                                              │
│                  │ and if "OK" is clicked, saves the last selected date and time in the       │                                              │
│                  │ "selecteddate" and "selectedtime" properties (if "Cancel" is clicked,      │                                              │
│                  │ "selecteddate" and "selectedtime" are set to empty strings).               │                                              │
└──────────────────┴────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────┘


Notes:
	If the current culture of the local computer does not use AM/PM designators, no AM/PM
	designators can be shown in the date and Time Pickers, regardless of selected GUI culture.


VBScript usage example:
───────────────────────

Set objDateTimeBox = CreateObject( "RobvanderWoude.DateTimeBox" )

With objDateTimeBox
	.top     = 200
	.left    = 300
	.timeout = 15
	.title   = "Pick a Date and Time"
	.Show
	WScript.Echo "Selected date and time: " & .selecteddate & " " & .selectedtime
	WScript.Echo
	WScript.Echo .ListProperties( )
End With

Set objDateTimeBox = Nothing

page last uploaded: 2022-10-05; loaded in 0.0216 seconds