Dynamic textbox add with date and time picker

bootstrap-datetimepicker with dynamic
Date/Time Picker for Twitter Boostrap
$('div[id^="datetimepicker"]').datetimepicker({
    language: 'en',
    format: 'dd/MM/yyyy hh:mm:ss',
    pick12HourFormat: true
});

$('.well').on('hover', 'div[id^="datetimepicker"]', function () {
    $(this).datetimepicker({
        language: 'en',
        format: 'dd/MM/yyyy hh:mm:ss',
        pick12HourFormat: true
    });
});

var id = 1;

$("#add").on('click', function () {
    id++;
    $(".well").append('<div id="datetimepicker' + id + '" class="input-append span12"><input type="text"/><span class="add-on"><i data-time-icon="icon-time" data-date-icon="icon-calendar" class="icon-calendar"></i></span><button name="remove" class="btn btn-danger btn-small"><i class="icon-white icon-trash"></i></button></div>');
});
$(".well").on('click', '[name="remove"]', function () {
    $(this).parent().remove();
});
Dynamic textbox add with date and time picker Dynamic textbox add with date and time picker Reviewed by Bhaumik Patel on 7:11 PM Rating: 5