RamanSall
RamanSall

Reputation: 385

Disable time in datteimpicker bootstrap

I am using bootstrap datetimepicker. I want to disable the time. Here is my code:

jQuery('#checkout').datetimepicker({  
     format: 'MM-DD-YYYY'   ,
     useCurrent: false           
});

pickTime:false -Shows error to me.

Upvotes: 1

Views: 54

Answers (2)

Prakash Thete
Prakash Thete

Reputation: 3892

You don't have to specify pickTime:false

If your format is

 format: 'MM-DD-YYYY'

It will by default remove the time part.

Demo : https://jsfiddle.net/Prakash_Thete/gkqc2tw2/

Upvotes: 1

palaѕн
palaѕн

Reputation: 73896

You can use minView option here like

jQuery('#checkout').datetimepicker({  
     format: 'MM-DD-YYYY',
     minView: 1
});

Upvotes: 0

Related Questions