Is there a way to disable the ability to enter future dates in a date format column of a table?
I have a form where users shouldn't be able to enter a record with a date that's after the current date.
Is there a way to disable the ability to enter future dates in a date format column of a table?
I have a form where users shouldn't be able to enter a record with a date that's after the current date.
Dear @z_forsty,
Try it like this:
fd.control('DataTable1').$on('edit', function(e) {
console.log(e)
if (e.column.field === 'Date') {
e.widget.setOptions({
max: new Date()
});
}
})
});
@Nikita_Kurguzov This worked perfectly thank you! Pasted full working version below for users looking for this solution.
fd.rendered(function() {
fd.control('DataTable1').$on('edit', function(e) {
console.log(e);
if (e.column.field === 'Date') {
e.widget.setOptions({
max: new Date()
});
}
});
});