Controle date with the datepicker

Hi,

I try toi check the date from a datepicker from the UI form!

I have one datepicker name (startdate) and another one call (returndate).

  1. I would like to check if the stratdate is today or in the futur.
  2. Check that the returndate is after the startdate.

I try with jquery code, but I don’t know the name of the component put in the UI form

regards
BLE

You should define these constraints in the Business Data Contract.

See here:

http://documentation.bonitasoft.com/contracts-and-contexts-0

the examples are pretty much what you want…

Regards
Seán

PS: if this answers your question, please mark as resolved.

Hi,

Thank’s for your answer…I add the two rules for the date, but it’s not working I have an error message at start.

http://s16.postimg.org/6mxhsoazp/Bonitasoft.jpg

You need to qualify your BDO…

So instead of

return startDate.after(new Date());

You need

return vacationRequestCtr.startDate.after(new Date());

The reason is because when using multiple BDM’s as input which one would it choose?

Regards
Seán

PS: if this answers your question, please mark as resolved.

Hi,

Thank’s for your answeer, but I have also try that change after I posted the previous message.

I think I should miss something, maybe in the UI forms, because it’snt working.

The link to te file : http://www.filedropper.com/vacationrequestdiagram-10

regards

I couldn’t get it to work either,

I have added a Bug Report here,

https://bonita.atlassian.net/browse/BBPMC-372

regards
Seán