Last active
December 17, 2015 12:38
-
-
Save emohamed/5610697 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>datepicker demo</title> | |
| <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> | |
| <script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
| <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
| </head> | |
| <body> | |
| <div id="datepicker"></div> | |
| <script> | |
| $("#datepicker").datepicker({ | |
| // Формата на датата може да смениш като ползваш: | |
| // http://api.jqueryui.com/datepicker/#utility-formatDate | |
| dateFormat: "yy-mm-dd", | |
| // Тази функция се вика като се кликне на определена дата | |
| // Можеш да симулираш линк по този начин. | |
| onSelect: function (date) { | |
| alert("Date is " + date); | |
| // Можеш да отидеш на линк с: | |
| // window.location = "http://google.com/?date=" + date; | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment