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.targetDefault Value
nullNotes
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
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot