Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery keeping date picker open all the time

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

like image 360
josephj1989 Avatar asked Dec 16 '11 09:12

josephj1989


People also ask

How do I keep my datepicker open?

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.

How to set date time picker in jQuery?

Get / Set value $(function () { // create DateTimePicker from input with current datetime value. $("#dateTime"). ejDateTimePicker({ value: new Date(), // sets the current datetime value }); });

How to add datepicker in cshtml?

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.


1 Answers

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.

like image 198
Corbin Avatar answered Sep 22 '22 15:09

Corbin