Can anyone suggest a place where i could look for date validations?
1. Date picker shouldn't allow backdates in one scenario.
2. No future dates in a scenario
3. find the difference between two dates and calculate the number of days in a scenario.
Now, these can be achieved through Java Script... YES.
However, the java script would be validated only when i come out of the coach, but i want the validation to happen immediately when the date is selected, particularly in the 3rd case, where as soon as the first and second dates are entered, the number of days have to be calculated and populated in the third text box.
There is something called the pointy hash java script which can be written in the attribute section of the text box, would this somehow help for the date validations to happen dynamically.
Any other approach that the experts might have used here which might come handy for me or anything that could point me in the right direction???
Any help greatly appreciated...
IBM BPM V8.0.1
kolban 10000004463322 Posts
Re: Date Format Validations2013-04-03T21:53:07ZThis is the accepted answer. This is the accepted answer.I think I once achieved something similar to what you are looking for using the following sample Coach View:
However I doubt this would help for #3.
It almost feels like you would be in the need of a new type of custom Coach View to achieve this effect.
The simplest technique I can think off would be to allow any data to be entered but have a validation handler kick in before page submission. This could then validate that the data was consistent. This should be pretty straightforward. However, it won't "restrict" data entry at data entry time but would rather validate data entry before submission.
Re: Date Format Validations2013-04-04T06:33:20ZThis is the accepted answer. This is the accepted answer.
- kolban 1000000446
Thanks for your reply... i do have validations in place using js to check if the field require value or not and the page would not be submitted unless all the mandatory fields are filled and like you said, it does so only when i click the submit button.
This coach view that you have shared looks interesting. let me play around with it a little bit.
However i was wondering if there was ANY option to have the validation kick in while i am still in the form.
epp 1100007GA249 Posts
Re: Date Format Validations2013-04-04T11:19:11ZThis is the accepted answer. This is the accepted answer.Hi,
For option 1 and 2 you can try to disable past or future dates. See this threads (are for version 7.2 but you probably get the idea):
BornikChatterjee 270002FWGC130 Posts
Re: Date Format Validations2013-04-04T18:15:12ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
Are you using Coach View and new coach or Heritage coaches? Above codes will work fine in Heritage Coach. For new version of coach you should check resultant html and change the js code accordingly. :)
Re: Date Format Validations2013-04-05T00:07:26ZThis is the accepted answer. This is the accepted answer.Hi,
I don't know if it's possible for datetime pickers but you can try the publish and subscribe provided by dojo.