AllowDateUntilToday & AllowDateSinceToday
Do not allow user pick a date later today, This property designed for date type fields
"allowDateUntilToday": true, //false
Do not allow user pick a date since today, This property designed for date type fields
"allowDateSinceToday": true, //false
[
{
"formName": "formName_01"
},
{
"groups": [
{
"groupName": "Informazioni Generali",
"tabName": "Dati pratica",
"tab": true,
"column": true,
"content": {
"rows": [
{
"name": "firstRow",
"column": true,
"fields": [
{
"Type": "date",
"id": "firstDate",
"label": "First Date",
"visible": true,
"allowDateSinceToday": true
},
{
"Type": "date",
"id": "secondDate",
"label": "Second Date",
"visible": true,
"allowDateUntilToday": true
}
]
}
]
}
}
]
},
{
"conditions": []
}
]
<!DOCTYPE html>
<html lang="en">
<head>
<!-- load plugin style -->
<link
href="https://plugins.wedat.eu/form-builder/plugin.css"
rel="stylesheet"
/>
</head>
<body>
<!-- this place where plugin will render -->
<div class="plugin"></div>
<!-- load plugin JS synchronously -->
<script src="https://plugins.wedat.eu/form-builder/plugin.js"></script>
<!-- init plugin options on your JS file or inline JS like this -->
<script>
window.FORM_BUILDER.init({
selector: '.plugin',
onComplete: (res) => {
// make what your want :)
console.log(res)
},
data: [
{
formName: 'formName_01'
},
{
groups: [
{
groupName: 'Informazioni Generali',
tabName: 'Dati pratica',
tab: true,
column: true,
content: {
rows: [
{
name: 'firstRow',
column: true,
fields: [
{
Type: 'date',
id: 'firstDate',
label: 'First Date',
visible: true,
allowDateSinceToday: true
},
{
Type: 'date',
id: 'secondDate',
label: 'Second Date',
visible: true,
allowDateUntilToday: true
}
]
}
]
}
}
]
}
],
options: {} // page options
})
</script>
</body>
</html>