metro4
Version:
The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style
61 lines (49 loc) • 1.94 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="../metro/css/metro-all.css?ver=@@b-version" rel="stylesheet">
<title>Test Any - Metro 4 :: Popular HTML, CSS and JS library</title>
</head>
<body class="m4-cloak">
<div class="container">
<DIV class="row">
<DIV class="cell-2 offset-1">
<INPUT id="LAST_UPDATE" name="last_update" class="input-small"
data-role="calendarpicker"
data-cls-calendar-header="bg-steel"
data-cls-calendar="compact"
data-clear-button="true"
data-format="DD/MM/YYYY"
data-input-format="DD/MM/YYYY"
data-cls-input="fg-orange text-center"
data-label="Last Update"
data-cls-label="text-small text-bold fg-steel"
value="" />
</DIV>
<DIV class="cell-2 mt-4">
<BUTTON id="SET_DATE" class="button square small rounded bg-green">
<SPAN class="icon mif-calendar fg-white"></SPAN>
</BUTTON>
<BUTTON id="CLEAR_DATE" class="button square small rounded bg-green">
<SPAN class="icon mif-calendar fg-white"></SPAN>
</BUTTON>
</DIV>
</DIV>
</div>
<script src="../metro/js/metro.js?ver=@@b-version"></script>
<script>
$(document).ready(function() {
$(document).on("click", "#SET_DATE", function(e) {
e.preventDefault();
Metro.getPlugin("#LAST_UPDATE", 'calendar-picker').val("01/02/2021");
});
$(document).on("click", "#CLEAR_DATE", function(e) {
e.preventDefault();
Metro.getPlugin("#LAST_UPDATE", 'calendar-picker').val("");
});
});
</script>
</body>
</html>