Last active
August 31, 2015 18:27
-
-
Save nnsnodnb/7cea89b2973d5d3fbbc6 to your computer and use it in GitHub Desktop.
jQueryを使って,<input type="date">に対応していないブラウザにカレンダーをフォームに表示させる
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="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<!-- jQuery --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<!-- jQueryUI --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-ja.min.js"></script> | |
<!-- | |
カレンダーテーマ remondの部分を変えることでデザイン変更可 | |
http://jqueryui.com/themeroller/ | |
--> | |
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css"> | |
<script type="text/javascript" src="calender.js"></script> | |
</head> | |
<body> | |
<form action="index.html" method="POST"> | |
<input type="text" id="datepicker"> | |
</form> | |
</body> | |
</html> |
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
$(function() { | |
$("#datepicker").datepicker(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment