DayPilot.DatePicker.target

The target property (string or DOM object) identifies the element linked to the date picker. The selected value is displayed using the target element and formatted using pattern.

Declaration

DayPilot.DatePicker.target

Default Value

null

Notes

You can set target to a string with the target element id or to a DOM object that references the target element directly.

If the target is an <input> element, the selected value is written to its value attribute.

For other target elements such as <div> and <span>, the selected value is written using innerText.

Example

const picker = new DayPilot.DatePicker({
  target: "start",
  pattern: "yyyy-MM-dd",
  // ...
});
picker.show();

See Also

DayPilot.DatePicker.pattern

DayPilot.DatePicker Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript