Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hel-guide
hel-developer-guide
Commits
868b2a46
Commit
868b2a46
authored
Jul 31, 2017
by
11277
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update hlsDatePicker.md
parent
d2c2916a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
32 deletions
+83
-32
hlsDatePicker.md
前端组件/hlsDatePicker.md
+83
-32
No files found.
前端组件/hlsDatePicker.md
View file @
868b2a46
# hlsDatePicker标签
日期选择器
日期选择器
(不包含时分秒)
```
xml
<h:hlsDatePicker
id=
"hlsDatePicker
xml配置
```
<!--基本用法-->
<h:hlsDatePicker id="hlsDatePickerId" bind="enabled:isEnabled,value:data.value" placeholder="hlsDatePicker"/>
```
### **主要属性**
| 属性名 | 类型 |
| --- | --- |
| culture | String |
| depth | String |
| footer | String
\|
Function |
| format | String |
| max | String |
| min | String |
| start | String |
| value | String |
| name | String |
| bind | Function |
| required | Boolean |
| change | Function |
| close | Function |
| open | Function |
| placeholder | String |
> **提示:** 属性用法请参考kendoui API文档 [http:\/\/docs.telerik.com\/kendo-ui\/api\/javascript\/ui\/datepicker](http://docs.telerik.com/kendo-ui/api/javascript/ui/datepicker)
属性名 | 类型
-------- | -----
promptColspan | Integer
promptClassName | String
promptImage | String
prompt | String
colspan | Integer
hlsClassName | String
animation | Boolean
ARIATemplate| String
culture | String
depth| String
footer| String & Function
format| String
max| String
min| String
start| String
value | String
name | String
bind | Function
required | Boolean
change | Function
close| Function
open | Function
placeholder | String
interval |Integer
timeFormat |String
> **提示:** 属性用法请参考kendoui API文档 http://docs.telerik.com/kendo-ui/api/javascript/ui/datetimepicker
### **用法示例**
```
javascript
//注意是写在script标签内的
var
viewModel
=
kendo
.
observable
({
data
:{},
isEnabled
:
true
});
function
open
(){
//...
}
function
change
(
e
){
//...
}
```
```
xml
<h:hlsDatePicker
id=
"hlsDatePicker"
max=
"2016-10-14"
name=
"datepicker"
placeholder=
"datepicker"
bind=
"value:data.birthday"
required=
"true"
open=
"open"
footer=
"fn:footer"
/>
<h:hlsDatePicker
id=
"hlsDatePickerId"
bind=
"enabled: isEnabled,value:data.value"
style=
"width:200px;"
max=
"2016-6-6"
placeholder=
"hlsDatePicker"
open=
"open"
required=
"true"
change=
"change"
prompt=
"日期选择器:"
/>
id:可写可不写;
bind:属性里面包含配置两个选项:
(1)enabled配置日期选择器是否可以编辑,值为Boolean类型的变量,在viewModel里面配置。
(2)value配置日期选择器与变量关联,默认是在ViewModel下面的变量;
max:可选择日期的上限值;
style可改变该控件的样式;
open:点击控件调用的方法;
change:选择日期之后的事件;
prompt:为控件添加一个label,该属性一般和
<h:hlsForm>
、
<h:hlsHBox>
一起使用;
```
> **提示**:
>
> * 遇到**object**类型 就向下添加子标签,当遇到普通类型时,就添加到当前的标签上。
> **提示:**
> - 上述所有属性直接添加在标签内即可,(**[属性名] = "..."**),对于既是**String**类型又是**Function**类型的属性,只需要加**fn:**前缀区分即可,(**fn:函数名**)
> - 对于**max min**等本该是**时间类型**的属性,改为日期字符串,且连接符号为"**-**"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment