Topic
  • 7 replies
  • Latest Post - ‏2013-04-05T06:39:36Z by SystemAdmin
SystemAdmin
SystemAdmin
7615 Posts

Pinned topic Date Format Validations

‏2013-04-03T19:22:51Z |
Hi,
Can anyone suggest a place where i could look for date validations?

Requirement:
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

Thanks!!!
G
Updated on 2013-04-05T06:39:36Z at 2013-04-05T06:39:36Z by SystemAdmin
  • kolban
    kolban
    3316 Posts

    Re: Date Format Validations

    ‏2013-04-03T21:53:07Z  
    I think I once achieved something similar to what you are looking for using the following sample Coach View:

    http://bpmwiki.blueworkslive.com/display/samples/Validation+Form

    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.

    Neil
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Date Format Validations

    ‏2013-04-04T06:33:20Z  
    • kolban
    • ‏2013-04-03T21:53:07Z
    I think I once achieved something similar to what you are looking for using the following sample Coach View:

    http://bpmwiki.blueworkslive.com/display/samples/Validation+Form

    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.

    Neil
    Hello Mr kolban,
    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.

    Thanks!!!
    G
  • epp
    epp
    49 Posts

    Re: Date Format Validations

    ‏2013-04-04T11:19:11Z  
    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):
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14833088&#14833088
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14870770&#14870770

    Regards,
    Eduardo
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Date Format Validations

    ‏2013-04-04T14:58:55Z  
    • epp
    • ‏2013-04-04T11:19:11Z
    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):
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14833088&#14833088
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14870770&#14870770

    Regards,
    Eduardo
    :(

    Both options not working for IBM BPM V8.0.1

    i tried custom html as well as inline java script but no luck....
  • BornikChatterjee
    BornikChatterjee
    126 Posts

    Re: Date Format Validations

    ‏2013-04-04T18:15:12Z  
    :(

    Both options not working for IBM BPM V8.0.1

    i tried custom html as well as inline java script but no luck....
    Hi G,

    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. :)

    Bornik
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Date Format Validations

    ‏2013-04-05T00:07:26Z  
    Hi,

    I don't know if it's possible for datetime pickers but you can try the publish and subscribe provided by dojo.

    Subscribe: http://dojotoolkit.org/reference-guide/1.7/dojo/subscribe.html
    Publish: http://dojotoolkit.org/reference-guide/1.7/dojo/publish.html

    Regards,
    VF
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: Date Format Validations

    ‏2013-04-05T06:39:36Z  
    Hi G,

    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. :)

    Bornik
    Hi Bronik,
    I am using coachview and new coach.