On this page
@addTagHelper *, Webority.Ui.RazorValue and onChange
The picker holds one UTC instant: value is an ISO string, and onChange gives back the new one (React only; Razor posts it under name).
One instant from a date and a time
AppDateTimePicker captures one moment. The person picks a date and a time of day in India Standard Time, and the field posts one UTC instant, so storage stays in UTC while the screen shows the time they expect. The value 2026-03-14T04:00:00Z shows as 14-Mar-2026 and 09:30. Until both parts are set the field posts an empty value, and clearing either part clears it.
Posts: 2026-03-14T04:00:00.000Z
Min and max
Constrain the selectable dates so an invalid slot cannot be picked.
Restrict to a valid window
Min and max are UTC instants. The date picker limits to the dates they fall on in the field's zone.
Zone
Read and enter the pair in the zone your people plan in; the note under the field names it.
Read in another zone
The zone changes only how the date and time are read and entered. The same instant shows as 04:00 here.
States
Disable a field that cannot change now, and mark a field that must be filled as required.
Disabled, required, and error
Every option
Every value of every prop, one cell each.
value
value=""value="2026-03-14T04:00:00Z"onChange
onChange is React only, so Razor posts the UTC instant under namemin / max: bounds
min="2026-03-10T00:00:00Z" (no max)max="2026-03-20T00:00:00Z" (no min)min and max togetherzone
zone="Asia/Kolkata" (default)zone="UTC"zone="America/New_York"disabled
disabled="false" (default)disabled="true"readOnly
read-only="false" (default)read-only="true"label
label="Starts at"required
required="false" (default)required="true"optional
optional="false" (default)optional="true"optionalLabel
optional-label="(optional)" (default)optional-label="Not needed"helperText
helper-text="Pick the slot the delivery starts"error
error="Pick a date and a time"name
name="startsAt" posts the UTC instant, no visible changeid
id="starts-at" sets the control id, no visible changeclassName
input-class="rounded-3"fieldClassName
class="mb-3" adds classes to the field wrapperdefaultValue
defaultValue has no Razor attribute; value sets the starting instanthelp
help="Pick when the delivery starts." adds an info tiphelpLabel
help-label="More information" (default)help-label="About this slot"Guidance
What to do, and what to avoid.
Use it when
- Capturing one instant a person sets by date and time: a meeting start, a deadline, a scheduled send.
- The value must be stored in UTC and shown in IST.
Reach for something else when
- You need only a calendar date. → AppDatePicker
- You need only a time of day. → AppTimePicker
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
17 props. The 5 most used come first.
Used on most screens 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault - | string | - | The field label, shown above the controls and used as the date control's accessible name. |
| valuedefault - | string | - | The instant as an ISO UTC string (for example 2026-03-14T04:00:00Z); written as 2026-03-14T04:00:00.000Z. |
| zonedefault Asia/Kolkata | string | Asia/Kolkata | The IANA zone the date and time are read and entered in. Default IST. |
| requireddefault false | bool | false | Marks the field required, with the required mark on the label. |
| errordefault - | string | - | An error message shown under the controls. |
Less common 12 props
| Prop | Type | Default | Description |
|---|---|---|---|
| namedefault - | string | - | The form field name the UTC instant posts under. |
| mindefault - | string | - | The earliest selectable date, as an ISO UTC string; its date in the zone is used. |
| maxdefault - | string | - | The latest selectable date, as an ISO UTC string; its date in the zone is used. |
| optionaldefault false | bool | false | Ends the label with (optional) when the field is not required. Required wins when both are set. |
| optional-labeldefault (optional) | string | (optional) | Replaces the built-in English text, for other languages. |
| helper-textdefault - | string | - | Replaces the zone note shown under the controls. |
| disableddefault - | bool | - | Disables both controls. |
| read-onlydefault false | bool | false | Shows the value but blocks editing. The value still posts. |
| helpdefault - | string | - | Info-tip content shown beside the label. |
| help-labeldefault More information | string | More information | The accessible name of the info-tip button. |
| iddefault - | string | - | The id of the control; the date control takes the id with -date added. A unique one is made when left out. |
| input-classdefault - | string | - | Extra classes on the control itself. The plain class attribute merges onto the field wrapper that holds the label, note and error instead. |
Screen reader
4 notes- The date control is named by the field label, and the time control carries its own name.
- An error sets aria-invalid and points aria-describedby at the error text, or at the helper text when there is no error.
- Both controls carry the required attribute as well as the visible required mark.
- The info tip beside the label is named by helpLabel.