Warning if past or future date is entered?

Questions, tips and tricks and techniques for scripting in Servoy

Warning if past or future date is entered?

Postby Detox » Tue Jul 27, 2010 6:06 pm

Hello Folks,

I am still using servoy v 3.12 and have a question regarding date entry on a form. I would like to have a large warning pop up on several forms that staff enter the date submitted on if it does not match "today". This would be a visual warning that the entry is being pre / post-dated.

Can anyone point me to the direction I need to take?

Thanks
Detox
 
Posts: 73
Joined: Wed Dec 13, 2006 11:02 pm

Re: Warning if past or future date is entered?

Postby ptalbot » Tue Jul 27, 2010 7:03 pm

Hi Detox,

that's a weird requirements you have here! If users are not supposed to enter anything else than today, why don't you auto-enter the date, or if it can be null, why don't you set a simple text field to enabled=false and add a button which, when clicked, will enter a new Date()?

Otherwise if what you are looking for is an alert box, you might want to have a look at the dialog plugin, or if you want this to be web compatible use a FID with application.showFormInDialog().
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Methods

Who is online

Users browsing this forum: No registered users and 6 guests

cron