I am creating a web application in crimson editor. I just want to know for the simple software I am using which jquery is best to use to display a calender and to be able to pick dates from the calender? Will the ‘datepicker’ be able to work in crimson editor?
The datepicker jquery is not working in my application:
Below is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="MyStyles.css">
</style>
<script type="text/javascript">
$(function() {
$( "#datepicker" ).datepicker();
});
</head>
<body>
<form action="create_session.php" method="post">
<p><strong>Date:</strong><input type="text" id="datepicker"></p>
</form>
</body>
</html>
My calender is not appearing when I click in the datepicker text box, why is it not working?
Thank You
You need to add the jQuery & jQuery Ui dependencies like so:
<form>
<p>Date: <input type="text" id="datepicker"></p>
</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
Thank you