Skip to content
Advertisement

Tag: bootstrap-datepicker

Bootstrap datepicker get current format

Is it possible to get the current format applied to bootstrap datepicker from the bootstrap-datepicker object? I have several datepickers with different formats and I’d like to get the format in each of them to apply different validation methods based on the current format. Answer I have 3 solutions for you. Solution 1: Declare dateFormat variable and use it on

bootstrap datepicker today as default

I am using this bootstrap-datepicker for my datepicker. I’d like the datepicker to choose “today” for start day or default day. I cannot figure out how to set “today” automatically, so I did an inefficient way HTML: JS: Online Sample: http://jsfiddle.net/BXZk2/ Just looking for an easy solution to make the default day as “TODAY”. Thanks Answer This should work: $(“#datepicker”).datepicker(“setDate”,

Advertisement