On https://snippet.dhtmlx.com/pmz0zk16?text=form
Please replace the js code with below:
const form = new dhx.Form("form", {
rows: [
{
type: "datepicker",
label: "Date",
value:new Date(),
required: true,
},
{
type: "button",
text: "Send",
submit: true,
},
]
});
function validate() {
document.querySelector("#validation-result").value = form.validate() ? "Valid form" : "Invalid form"
}