When we call Kendorangepicker, it enables 2 input fields - start and end dates. Is it possible to open kendorangepicker from single input field and once the ranges are selected, dates should return to the input field like 01-01-2019 - 20-09-2019.
2 Answers, 1 is accepted
answered on 26 Jul 2019, 03:08 PM
The range date picker must be two inputs. This is why it is initialized from a <div> element and it creates its inputs on its own. By default, those inputs don't have a name attribute, so they won't participate in a POST request. Thus, you could use the change event to collect the current range and put it in a hidden input for your purposes according to your needs.
I also made the following example where I hack the range picker main element to be invisible but to show up on click in a textbox that is later populated: https://dojo.telerik.com/@bratanov/OHikoHaC. I can't say whether this will keep working on a more complex layout and when the page gets scrolled, nor whether some other side effects may come up from it, because it is not a scenario we support or test.
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.