import { id as mid } from "module"; import { djbase, djclass } from "@implab/djx/declare"; import { attach, bind, createElement, prop } from "@implab/djx/tsx"; import { DjxWidgetBase } from "@implab/djx/tsx/DjxWidgetBase"; import Form from "@implab/djx/form/Form"; import { LocalDateTime } from "@js-joda/core"; import { TraceSource } from "@implab/core-amd/log/TraceSource"; import DateTextBox = require("dijit/form/DateTextBox"); import Button = require("dijit/form/Button"); import ValidationTextBox = require("dijit/form/ValidationTextBox"); const trace = TraceSource.get(mid); interface NewAppointmentProps { title: string; startAt?: Date; } @djclass export default class NewAppointment extends djbase(DjxWidgetBase) { value: NewAppointmentProps = {title: "Appointment 1"}; render() { return
ref={bind("value", prop(this, "value"))} method="DIALOG" onSubmit={this._onSubmit} onReset={this._onReset} onValidStateChange={this._onValidStateChange} onValueChange={this._onValueChange} >

; } private readonly _onSubmit = (evt: Event) => { trace.debug("onSubmit"); }; private readonly _onValidStateChange = (isValid?: boolean) => { trace.debug("isValid={0}", isValid); }; private readonly _onValueChange = (value: NewAppointmentProps) => { trace.debug("valueChange={0}", value); }; private readonly _onReset = (evt: Event) => { trace.debug("onReset"); //evt.preventDefault(); }; }