Solved

How to change Bootstrap Datepicker Format ?

Posted on 2016-10-24
1
30 Views
Last Modified: 2016-10-26
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
Comment
Question by:karthik80c
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 41859268
try this :

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

        })
1

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now