升级easyUI到1.9.4版本
This commit is contained in:
25
erp_web/js/easyui/demo/datebox/basic.html
Normal file
25
erp_web/js/easyui/demo/datebox/basic.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic DateBox - 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 DateBox</h2>
|
||||
<p>Click the calendar image on the right side.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="Start Date:" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="End Date:" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
34
erp_web/js/easyui/demo/datebox/buttons.html
Normal file
34
erp_web/js/easyui/demo/datebox/buttons.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DateBox Buttons - 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>DateBox Buttons</h2>
|
||||
<p>This example shows how to customize the datebox buttons underneath the calendar.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="Date With 2 Buttons:" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="Date With 3 Buttons:" labelPosition="top" data-options="buttons:buttons" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var buttons = $.extend([], $.fn.datebox.defaults.buttons);
|
||||
buttons.splice(1, 0, {
|
||||
text: 'MyBtn',
|
||||
handler: function(target){
|
||||
alert('click MyBtn');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
31
erp_web/js/easyui/demo/datebox/clone.html
Normal file
31
erp_web/js/easyui/demo/datebox/clone.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Clone DateBox - 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>Clone DateBox</h2>
|
||||
<p>Click the 'Clone' button to clone datebox components from the exiting datebox.</p>
|
||||
<div style="margin:20px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="cloneDatebox()">Clone</a>
|
||||
</div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input id="dt" class="easyui-datebox" label="Select Date:" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
<div id="cc" style="margin-top:10px"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function cloneDatebox(){
|
||||
var dt = $('<input>').appendTo('#cc');
|
||||
dt.datebox('cloneFrom', '#dt');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
45
erp_web/js/easyui/demo/datebox/dateformat.html
Normal file
45
erp_web/js/easyui/demo/datebox/dateformat.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Date Format - 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>Date Format</h2>
|
||||
<p>Different date formats are applied to different DateBox components.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="Default Format:" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="Customized Format:" labelPosition="top" data-options="formatter:myformatter,parser:myparser" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function myformatter(date){
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth()+1;
|
||||
var d = date.getDate();
|
||||
return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
|
||||
}
|
||||
function myparser(s){
|
||||
if (!s) return new Date();
|
||||
var ss = (s.split('-'));
|
||||
var y = parseInt(ss[0],10);
|
||||
var m = parseInt(ss[1],10);
|
||||
var d = parseInt(ss[2],10);
|
||||
if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
|
||||
return new Date(y,m-1,d);
|
||||
} else {
|
||||
return new Date();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
31
erp_web/js/easyui/demo/datebox/events.html
Normal file
31
erp_web/js/easyui/demo/datebox/events.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DateBox Events - 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>DateBox Events</h2>
|
||||
<p>Click the calendar image on the right side.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" data-options="label:'Select Date:',labelPosition:'top',onSelect:onSelect" style="width:100%;">
|
||||
</div>
|
||||
<div style="margin:10px 0">
|
||||
<span>Selected Date: </span>
|
||||
<span id="result"></span>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function onSelect(date){
|
||||
$('#result').text(date)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
25
erp_web/js/easyui/demo/datebox/fluid.html
Normal file
25
erp_web/js/easyui/demo/datebox/fluid.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fluid DateBox - 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 DateBox</h2>
|
||||
<p>This example shows how to set the width of DateBox to a percentage of its parent container.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="width: 100%" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="width: 50%" labelPosition="top" style="width:50%;">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
34
erp_web/js/easyui/demo/datebox/restrict.html
Normal file
34
erp_web/js/easyui/demo/datebox/restrict.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Restrict Date Range in DateBox - 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>Restrict Date Range in DateBox</h2>
|
||||
<p>This example shows how to restrict the user to select only ten days from now.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input id="dd" label="Select Date:" labelPosition="top" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#dd').datebox().datebox('calendar').calendar({
|
||||
validator: function(date){
|
||||
var now = new Date();
|
||||
var d1 = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||
var d2 = new Date(now.getFullYear(), now.getMonth(), now.getDate()+10);
|
||||
return d1<=date && date<=d2;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
26
erp_web/js/easyui/demo/datebox/sharedcalendar.html
Normal file
26
erp_web/js/easyui/demo/datebox/sharedcalendar.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Shared Calendar in DateBox - 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>Shared Calendar in DateBox</h2>
|
||||
<p>Multiple datebox components can share a calendar and use it to pick dates.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" data-options="label:'Start Date:',labelPosition:'top',sharedCalendar:'#cc'" style="width:100%;">
|
||||
</div>
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" data-options="label:'End Date:',labelPosition:'top',sharedCalendar:'#cc'" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
<div id="cc" class="easyui-calendar"></div>
|
||||
</body>
|
||||
</html>
|
||||
37
erp_web/js/easyui/demo/datebox/validate.html
Normal file
37
erp_web/js/easyui/demo/datebox/validate.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Validate DateBox - 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>Validate DateBox</h2>
|
||||
<p>When the selected date is greater than specified date. The field validator will raise an error.</p>
|
||||
<div style="margin:20px 0;"></div>
|
||||
<div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="Required Date:" labelPosition="top" required style="width:100%;">
|
||||
</div>
|
||||
<div style="margin-bottom:20px">
|
||||
<input class="easyui-datebox" label="End Date:" labelPosition="top" required data-options="validType:'md[\'10/11/2015\']'" style="width:100%;">
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$.extend($.fn.validatebox.defaults.rules, {
|
||||
md: {
|
||||
validator: function(value, param){
|
||||
var d1 = $.fn.datebox.defaults.parser(param[0]);
|
||||
var d2 = $.fn.datebox.defaults.parser(value);
|
||||
return d2<=d1;
|
||||
},
|
||||
message: 'The date must be less than or equals to {0}.'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user