Datepicker in custom code?

zoegoose 28 Jan, 2015
Hi, I can see a datepicker is available using the designer mode, but what would I add to my custom coded form to make use of the already existing scripts? I have three text fields that I want to use to gather dates. Thank you!
zoegoose 28 Jan, 2015
Ah it's ok, I got it working using this post: http://www.chronoengine.com/faqs/70-cfv5/5201-adding-a-datepicker-for-chronoforms-v5.html. Maybe not the most efficient way to do it but it works.
GreyHead 29 Jan, 2015
Answer
1 Likes
Hi zoegoose,

Your solution is fine.

If you want to check how to use the built-in datepicker create a temporary form with a datepicker in it and look at the code tab (or the Form HTML) to see what is there. Here's an example:
<div class="form-group gcore-form-row" id="form-row-datepicker1">
  <label for="datepicker1" class="control-label gcore-label-left">Datepicker Label</label>
  <div class="gcore-input gcore-display-table" id="fin-datepicker1">
    <input name="datepicker1" id="datepicker1" value=""  placeholder="" size="" class="form-control A" title="" style="" data-load-state="" data-tooltip="" type="text" data-gdatetimepicker="1" data-gdatetimepicker-format="m/d/Y" data-start_view="d" data-start_date="2014-11-30" />
  </div>
</div>
The data attributes are setting up the datepicker I think:
data-gdatetimepicker="1" data-gdatetimepicker-format="m/d/Y" data-start_view="d" data-start_date="2014-11-30"


Bob
zoegoose 29 Jan, 2015
Fantastic, thanks very much for the help. What a great product and great service, especially for free!
This topic is locked and no more replies can be posted.