first commit
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DateTimeSpinner - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic DateTimeSpinner</h2>
|
||||
<p>Click spin button to adjust date and time.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014 17:23" style="width:180px;">
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DateTimeSpinner with Clear Icon - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DateTimeSpinner with Clear Icon</h2>
|
||||
<p>A clear icon can be attached to the datetimespinner. Click it to clear the entered value.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<input class="easyui-datetimespinner" style="width:180px;" data-options="
|
||||
value: '6/24/2014 17:23:56',
|
||||
showSeconds: true,
|
||||
prompt: 'Input date time here!',
|
||||
icons:[{
|
||||
iconCls:'icon-clear',
|
||||
handler: function(e){
|
||||
$(e.data.target).datetimespinner('clear');
|
||||
}
|
||||
}]
|
||||
">
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid DateTimeSpinner - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Fluid DateTimeSpinner</h2>
|
||||
<p>The width of datetimespinner is set in percentages.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<p>width: 50%</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014 17:23" style="width:50%;">
|
||||
<p>width: 30%</p>
|
||||
<input class="easyui-datetimespinner" value="6/25/2014 17:23" style="width:30%;">
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Format DateTimeSpinner - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Format DateTimeSpinner</h2>
|
||||
<p>The DataTimeSpinner value can be formatted by specifying the 'formatter' and 'parser' functions.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<p>mm/dd/yyyy hh:mm</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014 17:23" style="width:180px;">
|
||||
<p>mm/dd/yyyy</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014" data-options="formatter:formatter1,parser:parser1" style="width:180px;">
|
||||
<p>yyyy-mm</p>
|
||||
<input class="easyui-datetimespinner" value="6/24/2014" data-options="formatter:formatter2,parser:parser2,selections:[[0,4],[5,7]]" style="width:180px;">
|
||||
<script type="text/javascript">
|
||||
function formatter1(date){
|
||||
if (!date){return '';}
|
||||
return $.fn.datebox.defaults.formatter.call(this, date);
|
||||
}
|
||||
function parser1(s){
|
||||
if (!s){return null;}
|
||||
return $.fn.datebox.defaults.parser.call(this, s);
|
||||
}
|
||||
function formatter2(date){
|
||||
if (!date){return '';}
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth() + 1;
|
||||
return y + '-' + (m<10?('0'+m):m);
|
||||
}
|
||||
function parser2(s){
|
||||
if (!s){return null;}
|
||||
var ss = s.split('-');
|
||||
var y = parseInt(ss[0],10);
|
||||
var m = parseInt(ss[1],10);
|
||||
if (!isNaN(y) && !isNaN(m)){
|
||||
return new Date(y,m-1,1);
|
||||
} else {
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user