javascript-ej1-demos/datepicker/localization.html

81 строка
3.1 KiB
HTML

<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Essential JS 1 : DatePicker - localization</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/cultures/ej.culture.en-US.min.js"></script>
<script src="../scripts/cultures/ej.culture.fr-FR.min.js"></script>
<script src="../scripts/cultures/ej.culture.vi-VN.min.js"></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-6">
<span>Select Culture</span>
</div>
<div class="col-md-6">
<select id="culture" class="e-ddl">
<option>en-US</option>
<option>vi-VN</option>
<option>fr-FR</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$("#datepick").ejDatePicker({
value: new Date(),
locale: "fr-FR",
headerFormat: 'MMMM yyyy',
width:"100%"
});
$("#culture").ejDropDownList({ width: "100px", change: "onChange", selectedItemIndex: 2 });
var ddobject = $("#culture").data("ejDropDownList");
});
function onChange(args) {
var datebject = $("#datepick").data("ejDatePicker");
datebject.setModel({ locale: args.value });
}
$("#sampleProperties").ejPropertiesPanel();
ej.DatePicker.Locale['fr-FR'] = {
watermarkText: "Sélectionner une date",
buttonText: "Aujourd'hui"
};
ej.DatePicker.Locale['vi-VN'] = {
watermarkText: "Chọn ngày",
buttonText: 'Hôm nay'
};
</script>
</body>
</html>