How can I use the jQuery UI Datepicker Client Side "Date Range" with Editor?
How can I use the jQuery UI Datepicker Client Side "Date Range" with Editor?
dt1
Posts: 52Questions: 5Answers: 0
https://jqueryui.com/datepicker/#date-range
I want to do the From-To Range calculation (and validation) on the Client side
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Hi @dt1 ,
Take a nose at this page here, this should get you going,
Cheers,
Colin
Hi Colin,
Thank you for replying.
Actualy I got the datapicker up and running on the Editor main window (I use Envelope).
The point is that I want to tie up the date fields "From" "To" and I can not find a way to apply the logic as described in the jQuery UI website.
I have to do it inside Editor fields (they do it in plain HTML)
The key here is the:
part. You basically want to replicate that with Editor's built in jQuery UI date picker option. You could do that using something like:
You might need to change
getDate
a little, it depends upon the exact configuration.Allan
Thanks Allan,
I will work on this (will probably take me some time)
meantime I reverted back to "Datetime" without any validation.
Works ok
Thanks again
Elan
If you are using the
datetime
input type, you can do the same thing - it hasmaxDate
andminDate
methods which can be used similar to the jQuery UI code I suggested above.Allan
Thanks again.
And what is the selector of the date time widget? It is not documented. Is it "datetime" or "editor-datetime". The options ar "opts" or what?
Elan
Hi Elan,
The
datetime
reference documents the options and methods available for Editor's built in date/time input - e.g.editor.field( fieldName ).minDate( date )
.Allan
Thank you Allan