Solved

How to change Bootstrap Datepicker Format ?

Posted on 2016-10-24
1
77 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
social media icons disappear on small screens 4 57
JSON help 8 49
Drag & Drop Error 5 33
CSS/jQuery scaling images and detecting height and width 8 14
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

752 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