<input class="js-monthpicker" type="hidden"><input type="text">
Field | Value |
---|---|
Hidden | Actual date (1th of the picked month) |
Text | Picked month |
$('.js-monthpicker').monthpicker();
You may want to customize the format:
$('.js-monthpicker').monthpicker({ altFormat: 'MM y' });
Use the ui-monthpicker class for styling.
.ui-monthpicker {
margin-top: 18px;
}
.ui-monthpicker .ui-datepicker-month {
display: none;
}
.ui-monthpicker td span {
padding: 5px;
cursor: pointer;
text-align: center;
}