Ich möchte die Zahlen auf den Wörtern im Vordergrund ändern.Ändern der Nummer im Monat
Ex: 0 = Januar/1 = Februar/2 = März ....
Dies ist mein 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>
Das ist mein Code JS ist
$(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);
}
});
})
Bitte kannst du mir helfen, das problem zu lösen, ich bin wirklich verloren.
Mögliche Duplikat [Get Monatsname von Datum] (http://stackoverflow.com/questions/1643320/get-month-name-from-date) – George
Können Sie erstellen JS Geige? –
Dies ist der Link des Tests http://pier17.fr/beta-test/ – Pierre