Page 1 of 1

Dates input

PostPosted: Sat Oct 24, 2009 9:54 pm
by gianni
I'm currently maintaining an application where a lot of date or datetime fields are managed.
Based on my experience dates input should be widely improved in Servoy.

I would like to propose the following improvements (all based on my current Servoy knowledge, sorry if I missed something...)
1) Calendar button. It should be an option to avoid cursor going on it. As of 3.5.10 users MUST always push two <NEXT_FIELD> key to really go to next field.
2) Calendar button. It should be possible to launch a customized calendar.
3) Any not digit character should be accepted as separator when a date or a time or a datetime is keyed based on defined format for that field. I mean: 01-10-2000 is evaluated equal to 01/10/2000 is evaluated equal to 01.10.2000 is evaluated equal to 01/10-2000 is evaluated equal to 01:10:2000 is evaluated equal to 01.10/2000. This is true also for the time only part: 01.10.20 if format is hh:mm:ss or for a full datetime field: 01.01.2001.01.01.01 if format is dd-MM-yyyy hh:mm:ss.
4) When exiting from an accepted date based on #3 date should automaticcaly be formatted based on format defined: keying 01.01.2001.01.01.01 if format is dd-MM-yyyy hh:mm:ss after leaving the field become 01-01-2001 01:01:01
5) If the user digit just first part(s) of those separated numbers composing datetime field then leave the field, after basic checkings, missing parts based on the current format are assumed as defaults the current day, month, year, hour, minute, second, tick. Example: if now is 07 aug 2009 10:11:12 and format is dd-MM-yyyy hh:mm:ss and the user keys 15 then exit the field accepted date become 15-08-2009 10:11:12

Comments?

Tnks,
Gianni

Re: Dates input

PostPosted: Sat Oct 24, 2009 10:45 pm
by Jan Aleman
Dates are a very philosophical subject, everybody has a different opinion about it. try searching the forum and you will see.

The good news is that all the items you suggest can already be built in Servoy. Looking forward to your example solutions in this thread!

Re: Dates input

PostPosted: Sun Oct 25, 2009 9:35 am
by gianni
Jan,

I :) and agree when you use the words 'philosophical subject' talking about dates...

Same time I think that if something could be done to simplify usage of all Servoy application for all end users...well...this should raise priority to any small issue like this...

Looking forward for more comments expecially those seeing negative side effects on this proposal...

Ciao,
Gianni

Re: Dates input

PostPosted: Thu Nov 05, 2009 12:39 am
by maria
I'd like to add to the desired features list.

1. A mask on a date field would be good.
I already asked about it in other topics but it looks like the mask is understood differently by different people.
Yes, we can put a format 'dd/MM/yyyy' on a date field but the users will have to type slashes.
If we put this format 'ddMMyyyy' they won't have to type slashes but the date will be a row of numbers without separators, ugly in my opinion.
What we want to do and see would be the users typing ddMMyyyy OR ddMMyy and seeing the slashes as separators, so when they type in two numbers for a day the cursor jumps over the slash and they are able to type the month and so on. More on this here viewtopic.php?f=2&t=13242&start=0&st=0&sk=t&sd=a

2. A double-click on a calendar field would be just great.

Re: Dates input

PostPosted: Thu Nov 05, 2009 12:46 am
by IT2Be
Would you be 'happy' when you can input ddMMyyyy (sample) and show dd/MM/yyyy (sample again) because that can be archieved by setting the format to ddMMyyyy|dd/MM/yyyy .

Re: Dates input

PostPosted: Thu Nov 05, 2009 4:51 am
by maria
IT2Be wrote:Would you be 'happy' when you can input ddMMyyyy (sample) and show dd/MM/yyyy (sample again) because that can be archieved by setting the format to ddMMyyyy|dd/MM/yyyy .


Oh yes, I would be happy if it worked.
The data type is timestamp,
the field type is calendar,
the format propererty of the field is 'ddMMyyyy|dd/MM/yyyy'

And it does not work, so i'm definitely not happy.
The format you are offering makes the user type slashes, and I've written already that I don't want the user to have to type the slashes.

Re: Dates input

PostPosted: Thu Nov 05, 2009 2:20 pm
by ROCLASI
Using the format ddMMyyyy|dd/MM/yyyy won't do because the first is the display format and the second is the format in how it is stored.
You might want to take a look at my suggestions in your other thread on this issue.

Hope this helps.

Re: Dates input

PostPosted: Thu Nov 05, 2009 2:23 pm
by ROCLASI
Hi Maria,

To reply to point 2 of your original post. Check out Patrick Talbot's DateChooser bean. It might do what you want.

Hope this helps.

Re: Dates input

PostPosted: Fri Nov 06, 2009 3:01 am
by maria
ROCLASI wrote:Hi Maria,

To reply to point 2 of your original post. Check out Patrick Talbot's DateChooser bean. It might do what you want.

Hope this helps.

Thanks Robert,
Great bean, I can't find the way to put in a mask when the field is empty but I'll discuss that directly with Patrick.

Kind Regards,
Maria