Always visible jQuery UI DatePicker

Jquery UiDatepicker

Jquery Ui Problem Overview


How can I use jQuery UI to display an always-visible datepicker widget?

Jquery Ui Solutions


Solution 1 - Jquery Ui

It's simple. Keep your jQuery code, but assign it to a <div> instead of an input box.

Date:
<div id="datepicker"></div>

<script>
    $(function() {
        $("#datepicker").datepicker();
    });
</script>

A functional example lives at the jQuery UI webpage for the datepicker widget, and I've also included one below.

$(function() {
  $("#datepicker").datepicker();
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<div id="datepicker"></div>

Solution 2 - Jquery Ui

From the documentation:

> Simply call .datepicker() on a div > instead of an input.

(To display the datepicker embedded in the page instead of in an overlay.)

Solution 3 - Jquery Ui

 .ui-datepicker {
z-index: 1000;
 width: 17em;
width:500px;
padding: .2em .2em 0;
display: none;
position: absolute;
padding: 100px 20px;
top: 100px;
left: 50%;
margin-top: -100px;
 } 

i have overrided the style to the above one and now it works better

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPiotr GView Question on Stackoverflow
Solution 1 - Jquery UiCᴏʀʏView Answer on Stackoverflow
Solution 2 - Jquery UiJeff SternalView Answer on Stackoverflow
Solution 3 - Jquery UidivyanairView Answer on Stackoverflow