Hello,
our users criticize that they have to fill date fields very exactly. They have to type the digits of the date and they have to type the dots to separate the date. Is there a possibility to render a date entry automatically? So the user should type "15032013' and the system automatically should render "15.03.2013". In the green screen we did this by using numeric fields and using an editmask.
Maybe there is a similar possibility in ProfoundUI? In the Visual Designer i had a look to the "Bind Value to a Program Field" dialog. When i change the field formatting property from "Date" to "Custom" a new field opens which is named "Custom JavaScript Function". I found no documentation for this field. Is this field a possibility to add an individual validation function to the widget? If this is true, what are the parameters?
Dieter
Formatting a date automatically
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Formatting a date automatically
This option on the binding dialog is in fact designed to do what you want. It allows you to write a custom function which will both control the formatting of the value when displayed, and also handle the validation when the user tries to submit the screen.
However, the option is currently it is not functional, due to a bug.
We're looking at correcting this.
When a fix is available, I will let you know and also provide some details on how it works.
However, the option is currently it is not functional, due to a bug.
We're looking at correcting this.
When a fix is available, I will let you know and also provide some details on how it works.
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Formatting a date automatically
I can confirm now that the bug is corrected for the next update to Profound UI. I have also created some documentation for this that you can see here:
http://www.profoundlogic.com/docs/displ ... +Formatter
The problem as it stands right now (in versions up to and including 4.6.4) is that the 'revert' property is not passed to the function, so it cannot determine whether it's being called for output or input. That is what we have corrected.
http://www.profoundlogic.com/docs/displ ... +Formatter
The problem as it stands right now (in versions up to and including 4.6.4) is that the 'revert' property is not passed to the function, so it cannot determine whether it's being called for output or input. That is what we have corrected.
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Formatting a date automatically
Thank you for your answer. I will try to use the function. Maybe i will have more questions about this in the future.
Dieter
Dieter
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Formatting a date automatically
Great. Look for the next release (it will be 4.7.0) that will include the fix for the 'revert' flag.
I'm not sure if I was very clear before, but the problem with the 'revert' flag is still there in the current release 4.6.4.
I'm not sure if I was very clear before, but the problem with the 'revert' flag is still there in the current release 4.6.4.
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Formatting a date automatically
Thank you, David.
Yes, you were clear in your post. I know, that the bug still is in version 4.6.4. The function is not urgent for me. So i think, i will test the way even if there is the bug in it.
Dieter
Yes, you were clear in your post. I know, that the bug still is in version 4.6.4. The function is not urgent for me. So i think, i will test the way even if there is the bug in it.
Dieter
Who is online
Users browsing this forum: No registered users and 10 guests