75 строки
2.7 KiB
HTML
75 строки
2.7 KiB
HTML
<!doctype html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Essential JS 1 : DatePicker - otherMonthDate</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8" />
|
|
<link href="../content/bootstrap.min.css" rel="stylesheet">
|
|
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
|
<link href="../content/default.css" rel="stylesheet" />
|
|
<link href="../content/default-responsive.css" rel="stylesheet" />
|
|
<!--[if lt IE 9]>
|
|
<script src="../scripts/jquery-1.11.3.min.js" type="text/javascript"></script>
|
|
<![endif]-->
|
|
<!--[if gte IE 9]><!-->
|
|
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"></script>
|
|
<!--<![endif]-->
|
|
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
|
<script src="../scripts/properties.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<div class="content-container-fluid">
|
|
<div class="row">
|
|
<div class="cols-sample-area">
|
|
<div class="frame">
|
|
<div class="control">
|
|
<input id="datepick" type="text" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="sampleProperties">
|
|
<div class="prop-grid">
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<span>Show Dates In Other Month
|
|
</span>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<input type="checkbox" id="othermonth" class="e-chkbox" value="ShowHide"
|
|
checked="checked" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
// declaration
|
|
$("#datepick").ejDatePicker({
|
|
displayDefaultDate: true,
|
|
value: new Date(2018, 05, 28),
|
|
width: "100%"
|
|
});
|
|
$("#othermonth").ejCheckBox({ change: "onStateChange" });
|
|
|
|
});
|
|
$("#sampleProperties").ejPropertiesPanel();
|
|
|
|
function onStateChange(args) {
|
|
var datebject = $("#datepick").data("ejDatePicker");
|
|
if (args.isChecked)
|
|
datebject.setModel({ showOtherMonths: true });
|
|
else {
|
|
datebject.setModel({ showOtherMonths: false });
|
|
}
|
|
}
|
|
|
|
</script>
|
|
<style type="text/css" class="cssStyles">
|
|
.cols-prop-area .content {
|
|
overflow-y: hidden;
|
|
}
|
|
</style>
|
|
</body>
|
|
</html>
|