import Bind from "@web-atoms/core/dist/core/Bind"; import {BindableProperty} from "@web-atoms/core/dist/core/BindableProperty"; import XNode from "@web-atoms/core/dist/core/XNode"; import AtomPopupButton from "../buttons/AtomPopupButton"; import AtomCalendar from "../calendar/AtomCalendar"; import SRCalendar from "../calendar/res/SRCalendar"; const shortDate = { year: "numeric", month: "short", day: "numeric" }; export default class AtomDateField extends AtomPopupButton { public static itemTemplate = XNode.prepare("itemTemplate", true, true); public selectedDate: Date ; public yearStart: any ; public yearEnd: any ; public enableFunc: any ; public currentMonth: any ; public itemTemplate: any ; public placeholder: string; public labelFunc: any; public locale: any; public localeOptions: any; protected srCalendar: SRCalendar; public create(): void { const srCalendar = this.app.resolve(SRCalendar); this.selectedDate = null; this.yearStart = -10; this.yearEnd = 10; this.enableFunc = null; this.labelFunc = null; this.locale = "en-US"; this.localeOptions = shortDate; this.placeholder = "Select Date"; this.render(