Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 141
  • Last Modified:

How to change Bootstrap Datepicker Format ?

Hi Experts,

We are trying with datepicker to change the format . But when we give jquery to set the format its not working at all . Here is my code
<input name="txtDate" type="text" value="25-10-2016" id="txtDate" class="hasDatepicker">

Open in new window


Js Script
    $(function () { 
            $("#txtDate").datepicker({ dateFormat: 'dd-mm-yy' });

        })

Open in new window

0
karthik80c
Asked:
karthik80c
1 Solution
 
leakim971PluritechnicianCommented:
try this :

$(function () {
            $("#txtDate").datepicker({ format: 'dd-mm-yy' });

        })
1

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now