Setting startDate and endDate via data-attribute seems to be broken?
See original GitHub issueIf I try to set the startDate and the endDate via data-attribute of the input-field:
<input id="inputBirthDate" type="text" name="inputBirthDate" class="datepicker" data-provide="datepicker" data-date-startdate="-120y" data-date-enddate="-18y">
The values for startDate and endDate are ignored. Also data-date-endDate
, data-date-startDate
and data-endDate
and data-startDate
are ignored.
Invoking the Datepicker via JS:
$('input#inputBirthDate').datepicker({ startDate: "-120y", endDate: "-18y" });
works perfectly. 😃
Is there a way to set startDate and endDate via data-attributes? Or any other way, besides invoking it via JS-Bindings?
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
getting the value of daterangepicker bootstrap - Stack Overflow
daterangepicker startDate and endDate returns moment objects not Javascript ... Now if we configure to show the dates between a ' - ',...
Read more >Options — bootstrap-datepicker documentation - Read the Docs
Most options can be provided via data-attributes. An option can be converted to a data-attribute by taking its name, replacing each uppercase letter...
Read more >Editing dates and date ranges - Zendesk help
In Explore, you can view dates broken down by years, half-years, quarters, months, weeks, weekdays, and days. You can also view a complete ......
Read more >Using data attributes - Learn web development | MDN
JavaScript access To get a data attribute through the dataset object, get the property by the part of the attribute name after data-...
Read more >Restrict data input by using validation rules - Microsoft Support
For example, a record with two date fields might require that values of one field always precede values of the other field (e.g.,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe data-date-start-date=“” works.
funciona si haces un $(‘#fecha1’).attr(‘data-start-date’,‘-120y’); $(‘#fecha2’).attr(‘data-end-date’,‘-18y’);