1
$('.nativedatepicker').focus(function(event) {
var currentField = $(this);
var myNewDate = Date.parse(currentField.val()) || new Date();
if(typeof myNewDate === "number") {
myNewDate = new Date (myNewDate);
}

            // Same handling for iPhone and Android
            window.plugins.datePicker.show({
                date : myNewDate,
                mode : 'date', // date or time or blank for both
                allowOldDates : true
            }, function(returnDate) {
                var newDate = new Date(returnDate);
                currentField.val(newDate.toString("dd/MMM/yyyy"));

                // This fixes the problem you mention at the bottom of this script with it not working a second/third time around, because it is in focus.
                currentField.blur();
            });
        });

私は2つの入力を持っています

これを挿入しましたが、2番目のフィールドを選択した後、日付ピッカーが機能しなくなります 助けてください

4

0 に答える 0