Buy Now
Sign in

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

stikkimorey , August 22 2018, 11:22
S
stikkimorey 72
August 22 2018, 11:22 #379785
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 64
August 23 2018, 08:47 #379811
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 72
August 23 2018, 09:28 #379812
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 64
August 23 2018, 10:12 #379813
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 72
August 23 2018, 12:09 #379815
Thanks Bob - sent via PM
Mikki
healyhatman 7
August 24 2018, 03:10 #379828
Try {date:Y-m-d$(var:read_last_booking.last_booking.end_date)}
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
stikkimorey 72
August 24 2018, 20:20 #379850
Thanks - I just tried that, but no success.
S
stikkimorey 72
August 30 2018, 20:25 #379944
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.