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

PropertyDescription
label
string
Visible label.
description
string
Helper text.
required
boolean
default: false
Marks the field required.
readOnly
boolean
default: false
Disables editing.

Type-specific properties

PropertyDescription
min
string (ISO date) | "today" | expression
Earliest allowed date. Accepts "today" as a dynamic value.
max
string (ISO date) | "today" | expression
Latest allowed date.
defaultValue
string | "today"
Prefill on a new form.
firstDayOfWeek
number 0-6
default: locale default
0 = Sunday, 1 = Monday, etc.
disableWeekends
boolean
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 articles

  • DateTime field

    Combined date + time picker. Stores a full ISO 8601 timestamp in SharePoint.