Forums

Set the earliest date in a calendar to a value from a read_data function

stikkimorey 22 Aug, 2018
Hi

I need to set the earliest collection date in a calendar to be the end date of the previous booking.

I can access the previous booking end date with {var:read_last_booking.end_date} , but I do not know how to put this value into the Earliest date/time filed

Thanks
GreyHead 23 Aug, 2018
Hi stikkimorey,

If that has a YYYY-MM-DD format then I think you can enter it directly in the Earliest date/time box.

Bob
stikkimorey 23 Aug, 2018
I was hoping so.
Here is the value I am putting in:  {var:read_last_booking.last_booking.end_date}

When I run it in a debugger on the form I get:    2019-01-10

But I can select any date I like in the calendar when I put it in
the
the Earliest date/time box...
GreyHead 23 Aug, 2018
Hi stikkimorey,

Please post a link to the form/listing so that we can take a quick look.

Bob
stikkimorey 23 Aug, 2018
Thanks Bob - sent via PM

Mikki
healyhatman 24 Aug, 2018
Try {date:Y-m-d$(var:read_last_booking.last_booking.end_date)}
stikkimorey 24 Aug, 2018
Thanks - I just tried that, but no success.
stikkimorey 30 Aug, 2018
To get round this, I put another calendar onto the form, gave it the data source, set it's attributes to hidden in the advanced tab, and then used it's ID in the advanced tab of the first calendar. Clunky, but it works.
This topic is locked and no more replies can be posted.