Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery Datepicker should display date only

I want to display the date only without the time on the text , but it seems that it didn't work even I've set the format of the datepicker. And also I dont want to display the Time in the datepicker. Please see image below, I want to remove the yellow highlighted.

var defaultFormat = { dateFormat: 'mm/dd/yy' };
$.datepicker.setDefaults(defaultFormat);
$('#EM_Date').datetimepicker({
    showHour: false,
    showMinute: false
});

enter image description here

like image 332
user335160 Avatar asked Dec 13 '22 02:12

user335160


2 Answers

Use $( "#EM_Date" ).datepicker();​

like image 56
Krishnanunni Jeevan Avatar answered Dec 30 '22 11:12

Krishnanunni Jeevan


use this format,

$('.picker').datetimepicker({ dateFormat:dateFormat: 'mm/dd/yy'  '', timeFormat: 'hh:mm tt', dateonly:true }); 
like image 33
ketan italiya Avatar answered Dec 30 '22 10:12

ketan italiya