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: 2019-03-30 06:33:10
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.

<form>
Date:
<input id="datepicker">
</form>

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.


*