Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Datepicker


How can i implement double datepicker? it can only work the first one


<div class="row fv-row mb-7">
<div class="col-md-3 text-md-end">
<!--begin::Label-->
<label class="fs-6 fw-bold form-label mt-3">
<span class="required">Join Date</span>
<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Set join date"></i>
</label>
<!--end::Label-->
</div>
<div class="col-md-9">
<!--begin::Input-->
<input class="form-control form-control-solid" name="join_date" placeholder="Pick a join date" id="kt_datepicker_1" />
<!--end::Input-->
</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row fv-row mb-7">
<div class="col-md-3 text-md-end">
<!--begin::Label-->
<label class="fs-6 fw-bold form-label mt-3">
<span class="">Resign Date</span>
<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Set the name of the store"></i>
</label>
<!--end::Label-->
</div>
<div class="col-md-9">
<!--begin::Input-->
<input class="form-control form-control-solid" name="resign_date" placeholder="Pick a resign date" id="kt_datepicker_1" />
<!--end::Input-->
</div>
</div>


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Bowi andreyano

You have both inputs with the same id attribute. Please try to change the to a different name.




In the sample js file, we initialize the datepicker in this file
src/js/custom/apps/projects/settings/settings.js


$("#kt_datepicker_1").flatpickr();


Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(