Date field
Date picker with calendar UI, configurable min/max range, locale-aware formatting, and optional time component.
The Date field presents a calendar picker for selecting a date. The displayed format
follows the current locale (e.g. 20/05/2026 in en-AU, 5/20/2026 in en-US);
the value is stored in SharePoint as an ISO 8601 date.
For date + time use the DateTime field. For time-only values use Time.
It binds to SharePoint's DateTime column type (configured as Date Only).
Common properties
| Property | Description |
|---|---|
labelstring | Visible label. |
descriptionstring | Helper text. |
requiredboolean default: false | Marks the field required. |
readOnlyboolean default: false | Disables editing. |
Type-specific properties
| Property | Description |
|---|---|
minstring (ISO date) | "today" | expression | Earliest allowed date. Accepts "today" as a dynamic value. |
maxstring (ISO date) | "today" | expression | Latest allowed date. |
defaultValuestring | "today" | Prefill on a new form. |
firstDayOfWeeknumber 0-6 default: locale default | 0 = Sunday, 1 = Monday, etc. |
disableWeekendsboolean default: false | Grey out and reject Sat/Sun selection. |
JavaScript recipes
Default to today on a new form
f365.events.onLoad(() => {
if (f365.context.displayMode === 'new' && !f365.field('SubmittedOn').value) {
f365.field('SubmittedOn').value = new Date().toISOString().slice(0, 10);
}
});
Compute the difference between two dates
const from = new Date(f365.field('StartDate').value);
const to = new Date(f365.field('EndDate').value);
const days = Math.floor((to.getTime() - from.getTime()) / 86_400_000) + 1;
f365.field('Duration').value = days;
Forbid past dates with a clear message
f365.field('DueDate').on('validate', (value) => {
if (!value) return;
const today = new Date().toISOString().slice(0, 10);
if (value < today) return 'Due date cannot be in the past.';
});
Related
Related articles
- DateTime field
Combined date + time picker. Stores a full ISO 8601 timestamp in SharePoint.