jQuery UI Datepicker with Default Date

jQuery datepicker with default date. Basically, this is a jQuery UI built in datepicker, however, its can be used in core version of jQuery along with jQuery UI CSS & JS.

Plugin Overview

Plugin: jquery-ui-built-in-datepicker
Author: Brendan Skousen
Licence: MIT Licence
Published: March 30, 2019
Repository: Fork on CodePen
Dependencies: jQuery 1.3.1 or Latest version and jQuery UI

File Type: zip archive (HTML, CSS & JavaScript)
Package Size: 4 KB

How to Use jQuery UI Datepicker Default Date :

1. To use this simple datepicker, load the jQuery, jQuery UI Js and CSS into HTML document.

<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

<!-- jQuery UI -->
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>

<!-- jQuery UI CSS -->
<link rel='stylesheet' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'>
<link rel='stylesheet' href='http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css'>

2. After this, create an input element in your form.

<input id="datepicker">

3. Finally, initialize the plugin in anonymous function or in jQuery document ready function.

 $(function() {
$( "#datepicker" ).datepicker();

Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.