i want to change the numbers on words in front.
Ex : 0 = January / 1 = February / 2 = March....
This is my code HTML
<div class="input-group btn-group select-date">
<button class="btn btn-default" type="button"><i class="fa fa-caret-left"></i></button>
<input type="text" class="form-control" value="05" min="01" max="12" readonly>
<button class="btn btn-default" type="button"><i class="fa fa-caret-right"></i></button>
</div>
This is my code JS
$(function(){
$('.select-date .btn:last-of-type').on('click', function() {
var btn = $(this);
var input = btn.closest('.select-date').find('input');
if (input.attr('max') == undefined || parseInt(input.val()) < parseInt(input.attr('max'))) {
input.val(parseInt(input.val(), 10) + 1);
} else {
btn.next("disabled", true);
}
});
$('.select-date .btn:first-of-type').on('click', function() {
var btn = $(this);
var input = btn.closest('.select-date').find('input');
if (input.attr('min') == undefined || parseInt(input.val()) > parseInt(input.attr('min'))) {
input.val(parseInt(input.val(), 10) - 1);
} else {
btn.prev("disabled", true);
}
});
})
Please can you help me to solved the problem, i'm really lost.