form = new dhx.Form(null, {
css: “dhx_widget–bordered”,
padding: 10,
rows: [
{
cols: [
{
type: “datepicker”,
id: “startDateTime”,
label: “{{message.text_search_date_1}}”,
dateFormat: naf.v.date_format + " " + “%H:%i”,
timeFormat: 24,
timePicker: true,
required: true,
readonly: true,
width: 200
},
]
},
]
});
form.getItem("startDateTime").getWidget().events.on("beforeHide", function(value, init) {
console.log("beforeHide", value, init);
return true;
});
this is my code.
Why is this happening when hidden events in the calendar are not running normally?
TTsand
#2
Hi,
The afterHide
event is triggered after the entire control is hidden.
Documentation for the afterHide
event:
If you’re trying to get data right after the date selection popup collapses, you should use the blur
event instead.
Documentation for the blur
event:
Here’s an example:
https://snippet.dhtmlx.com/ygzukljz
Also, the .getWidget()
method is used to get access to the control’s API.
Documentation for the .getWidget()
method: