Buy Now
Sign in

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

stikkimorey , August 22 at 11:22
S
stikkimorey
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
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
stikkimorey
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
Hi stikkimorey,
Please post a link to the form/listing so that we can take a quick look.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
stikkimorey
Thanks Bob - sent via PM
Mikki
healyhatman
Try {date:Y-m-d$(var:read_last_booking.last_booking.end_date)}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
S
stikkimorey
Thanks - I just tried that, but no success.
S
stikkimorey
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.