IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: It's as simple as creating 2 instances with the same id to form a daterange picker:Ĭonst picker = datepicker ( '.some-input', ) License MIT The getRange method will conveniently give you an object with the start and end date selections. Dates will be enabled / disabled on each calendar automatically when the user selects a date on either. The 1st calendar will serve as the minimum date and the 2nd calendar as the maximum. Want 2 calendars linked together to form Voltron a daterange picker? It's as simple as giving them both the same id! By using the id option, Datepicker handles all the logic to keep both calendars in sync. You can either enter a year in the input, click a month, or both: Manual Year & Month Navigationīy clicking on the year or month an overlay will show revealing an input field and a list of months. This is because those input's already have a built in calendar and can cause problems. NOTE: Datepicker will not change the value of input fields with a type of date. Note: The formatter function will only run if the datepicker instance is associated with an field.It will properly indent the code and add line breaks so that the code makes perfect sense. skip to package search or skip to sign in. JS Formatter is a useful tool that allows you to format JS Code that is minified or unformatted. There are 22 other projects in the npm registry using js-datepicker. If used with an element (the common use case), then the 's value will automatically be set when selecting a date. Start using js-datepicker in your project by running npm i js-datepicker. You can use Datepicker with any type of element you want. The return value of the datepicker function is the datepicker instance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |