Controle date with the datepicker

1
0
-1

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

1 answer

1
0
-1

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.

Comments

Submitted by ble on Mon, 04/04/2016 - 15:55

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

Submitted by Sean McP on Tue, 04/05/2016 - 08:19

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.

Submitted by ble on Tue, 04/05/2016 - 10:41

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

Submitted by Sean McP on Tue, 04/05/2016 - 12:23

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

Notifications