Latest web development tutorials
×

jQuery EasyUI Tutorial

jQuery EasyUI Tutorial jQuery EasyUI Introduction

jEasyUI application

jEasyUI Create a CRUD application jEasyUI Create a CRUD data grid jEasyUI Form CRUD application jEasyUI Create an RSS reader

jEasyUI Drag and drop

jEasyUI Basic drag and drop jEasyUI Create a drag-and-drop shopping cart jEasyUI Create a school curriculum

jEasyUI Menus and buttons

jEasyUI Create a simple menu jEasyUI Create a link button jEasyUI Create a menu button jEasyUI Create a split button

jEasyUI layout

jEasyUI Create a border layout jEasyUI Create a complex layout jEasyUI Creates a fold panel jEasyUI Create a tab page jEasyUI Dynamically add a tab jEasyUI Add the AutoPlay tab jEasyUI Create the XP style left panel

jEasyUI Data grid

jEasyUI Convert HTML tables to data grids jEasyUI Get the selected row data jEasyUI Add the query function jEasyUI Add a toolbar jEasyUI Create complex toolbars jEasyUI Sets the frozen column jEasyUI Dynamically change columns jEasyUI Format the column jEasyUI Set sort jEasyUI Custom sorting jEasyUI Create a column combination jEasyUI Add a check box jEasyUI Custom tab jEasyUI Enable in-line editing jEasyUI Extension editor jEasyUI Column operation jEasyUI Merge Cells jEasyUI Create a custom view jEasyUI Create a footer summary jEasyUI Condition Sets the line background color jEasyUI Create an attribute grid jEasyUI The extended line shows the details jEasyUI Create a subgrid jEasyUI Display massive data jEasyUI Add a paging component

jEasyUI window

jEasyUI Create a simple window jEasyUI Customize the Window Toolbar jEasyUI Window and layout jEasyUI Create a dialog box jEasyUI Customize the dialog box

jEasyUI Tree menu

jEasyUI Use the markup to create a tree menu jEasyUI Create an asynchronous tree menu jEasyUI Tree menu to add nodes jEasyUI Create a tree menu with check boxes jEasyUI Tree menu drag and drop control jEasyUI The Tree menu loads the parent / child nodes jEasyUI Create the base tree grid jEasyUI Create a complex tree grid jEasyUI Dynamic loading of tree jEasyUI The tree grid adds pagination jEasyUI Tree-lazy lazy-loading node

jEasyUI Form

jEasyUI Create an asynchronous submission form jEasyUI Form validation jEasyUI Create a tree drop-down box jEasyUI Format the drop-down box jEasyUI Filter down the data grid

jEasyUI Reference Manual

jQuery EasyUI Plugin jQuery EasyUI Extended

jQuery EasyUI form plugin - Datebox Date box

jQuery EasyUI plugin jQuery EasyUI plugin

Extended from $ .fn.combo.defaults. By $ .fn.datebox.defaults override the default defaults.

Date box (datebox) to editable text boxes and drop-down calendar panels together, the user can select a date from the drop-down calendar panel. In the text box, enter a string of sad converted to a valid date. The selected date can also be converted to a desired format.

rely

  • combo
  • calendar

usage

Creation date from the tag box (datebox).

<Input id = "dd" type = "text" class = "easyui-datebox" required = "required">

Use javascript creation date box (datebox).

<Input id = "dd" type = "text">
$ ( '# Dd'). Datebox ({
    required: true
});

Attributes

The property extends from the combination (combo), the following is the date box (datebox) added property.

名称 类型 描述 默认值
panelWidth number 下拉日历面板的宽度。 180
panelHeight number 下拉日历面板的高度。 auto
currentText string 当前日期按钮上显示的文本。 Today
closeText string 关闭按钮上显示的文本。 Close
okText string 确定按钮上显示的文本。 Ok
disabled boolean 设置为 true 时禁用该域。 false
buttons array 日历下面的按钮。该属性自版本 1.3.5 起可用。
代码实例:
var buttons = $.extend([], $.fn.datebox.defaults.buttons);
buttons.splice(1, 0, {
	text: 'MyBtn',
	handler: function(target){
		alert('click MyBtn');
	}
});
$('#dd').datebox({
	buttons: buttons
});
sharedCalendar string,selector 多个日期框(datebox)组件使用的共享日历。该属性自版本 1.3.5 起可用。
代码实例:
<input class="easyui-datebox" sharedCalendar="#sc">
<input class="easyui-datebox" sharedCalendar="#sc">
<div id="sc" class="easyui-calendar"></div>
null
formatter function 格式化日期的函数,该函数有一个 'date' 参数,并返回一个字符串值。下面的实例演示如何重写默认的格式化(formatter)函数。
$.fn.datebox.defaults.formatter = function(date){
	var y = date.getFullYear();
	var m = date.getMonth()+1;
	var d = date.getDate();
	return m+'/'+d+'/'+y;
}
parser function 解析日期字符串的函数,该函数有一个 'date' 字符串,并返回一个日期值。下面的实例演示如何重写默认的解析(parser)函数。
$.fn.datebox.defaults.parser = function(s){
	var t = Date.parse(s);
	if (!isNaN(t)){
		return new Date(t);
	} else {
		return new Date();
	}
}

event

名称 参数 描述
onSelect date 当用户选择一个日期时触发。
代码实例:
$('#dd').datebox({
	onSelect: function(date){
		alert(date.getFullYear()+":"+(date.getMonth()+1)+":"+date.getDate());
	}
});

method

The methods extend from a combination (combo), the following is a method for rewriting date box (datebox).

名称 参数 描述
options none 返回选项(options)对象。
calendar none 获取日历(calendar)对象。下面的实例演示如何获取日历(calendar)对象,然后重现它。
// get the calendar object
var c = $('#dd').datebox('calendar');
// set the first day of week to monday
c.calendar({
	firstDay: 1
});
setValue value 设置日期框(datebox)的值。
代码实例:
$('#dd').datebox('setValue', '6/1/2012');	// set datebox value
var v = $('#dd').datebox('getValue');	// get datebox value

jQuery EasyUI plugin jQuery EasyUI plugin