Date comparison

Hi.
this code does not work, can you help me?
if (doo.model.date.value < doo.model.previousDate.value){
doo.toast.error(“Date error”)
}
Can I set time how long the message will be visible?
Thanks
Jan

Hi,
I have a similar script and everything works as it should.

if(doo.model.date.value < doo.model.previousDate.value) {
doo.toast.error(“Incorect date entry”,“Error”);
};

image.

The time setting cannot be set for the message toast.

Best Regards,

Filip