Title: Initialize Datepicker with javascript
Last modified: September 4, 2020

---

# Initialize Datepicker with javascript

 *  Resolved [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/)
 * Is there a function I can use to initialize the date picker after duplicating
   it?
    I’m using a repeater to duplicate any field in contact form 7. Is there 
   a function I should call after duplication the field in order for it to appear
   properly?
 * Something like: datePicker.init()?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finitialize-datepicker-with-javascript%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Carlos Moreira](https://wordpress.org/support/users/carlosmoreirapt/)
 * (@carlosmoreirapt)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/#post-13373414)
 * Hi, yes, you can use
 * `dtp_init();`
 *  Thread Starter [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/#post-13443400)
 * Thanks, but this will reset all the fields that were already filled in as well.
   
   Can I call the init function on a single date field?
 * Something like: `$('#my-date').dtp_init();` ?
 *  Thread Starter [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/#post-13726560)
 * Hi just checking if you got my last post
    -  This reply was modified 5 years, 7 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).
 *  Thread Starter [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/#post-13862908)
 * Sorry to repeat myself, but is there a way to do something like this: `$('#my-
   date').dtp_init();` ?
    -  This reply was modified 5 years, 6 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).
 *  [Carlos Moreira](https://wordpress.org/support/users/carlosmoreirapt/)
 * (@carlosmoreirapt)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/#post-13863269)
 * [@jules-colle](https://wordpress.org/support/users/jules-colle/) unfortunately
   not
 * You can however use code to trigger the original script loaded by the plugin:
   
   [https://xdsoft.net/jqplugins/datetimepicker/](https://xdsoft.net/jqplugins/datetimepicker/)
 * Greetings, Carlos

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Initialize Datepicker with javascript’ is closed to new replies.

 * ![](https://ps.w.org/date-time-picker-field/assets/icon.svg?rev=2964043)
 * [Availability Datepicker – Booking Calendar for Contact Form 7 – Input WP](https://wordpress.org/plugins/date-time-picker-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/date-time-picker-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/date-time-picker-field/)
 * [Active Topics](https://wordpress.org/support/plugin/date-time-picker-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/date-time-picker-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/date-time-picker-field/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Carlos Moreira](https://wordpress.org/support/users/carlosmoreirapt/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/initialize-datepicker-with-javascript/#post-13863269)
 * Status: resolved