Question

I would like to use datepicker to insert date and time into textbox.

i need to change dd/mm/yyyy to dd.mm.yyyy 00:00:00 using jquery

mine is here:

$(function() {
$("#TextBoxStart").datepicker({ altFormat: "dd.mm.yy" });
});


$(function() {
$("#TextBoxStop").datepicker({ altFormat: "dd.mm.yy" });

});

but doesnt work as i said

thanks all interest

Was it helpful?

Solution

You have to use date time picker instead of using only datepicker

$('.datetimepicker')
    .datetimepicker({ 
        dateFormat: 'yy.mm.dd', 
        timeFormat: 'HH:mm' 
     });

Adding a Timepicker to jQuery UI Datepicker

OTHER TIPS

Use DateTimePicker:

$('#datetimepicker').datetimepicker({
  format:'d.m.Y H:i',
});

output like this : 04.02.2014 11:18

Check it : http://jsfiddle.net/mehmetakifalp/v6CZv/

and more : http://xdsoft.net/jqplugins/datetimepicker/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top