$(function() {
    $( "#datepicker" ).datepicker({
        minDate: -365,
        maxDate: "+0M",
        showOn: "button",
        dateFormat: 'dd-mm-yy',
        showButtonPanel: true,
        buttonText: "Select date",
        inline: true

    });
});
$(function() {
    $( "#datepicker" ).datepicker({
        minDate: -365,
        maxDate: "+0M",
        showOn: "button",
        dateFormat: 'dd-mm-yy',
        showButtonPanel: true,
        buttonText: "Select date",
        inline: true
    });
    $('#datepicker').keyup(function () {
        $('#datepicker').val('');
        $('#to').attr('disabled', 'disabled');
        alert('Please select date from Calendar');
    });
});

add new datetinme