Normal behavior of datepicker is to open when a texbox is clicked and close when a date is selected(clicked). What I need to do is Keep it open from form load and allow user to click repeatedly.I am handling the click event
thanks
You have to use . show() method to keep your dateTimePicker visible, note that all the DateTimePicker's functions are reachable via the data attribute e.g.
Get / Set value $(function () { // create DateTimePicker from input with current datetime value. $("#dateTime"). ejDateTimePicker({ value: new Date(), // sets the current datetime value }); });
First, we need to link the CSS into our layout. Then, we link the JS file into our layout at the bottom line of code. After that, we try to assign the format of our input in class "datepicker". Then, we add another class in Add cshtml.
According to the documentation, you can call it on a div instead of an input and it will stay open and be inline. http://jqueryui.com/demos/datepicker/#inline
You could use it's onSelect event to handle when a date is selected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With