知识学习

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 776|回复: 0

Datepicker for bootstrap-material日期选择器属性说明

[复制链接]

升级   100%

152

主题

152

帖子

734

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
734
发表于 2022-9-30 14:12:11 | 显示全部楼层 |阅读模式
Datepicker for bootstrap-material日期选择器属性说明

引用属性相同:
bootstrap-material-datepicker.js => bootstrap-material-date time picker.js
bootstrap-material-datepicker.css => bootstrap-material-date time picker.css
设置属性
参数:
Name(名称) Type(类型) Description(描述)描述
format String MomentJS Format格式:'YYYY-MM-DD HH:mm'
shortTime Boolean true => Display 12 hours AMtrue => 显示12小时
minDate (String|Date|Moment) Minimum selectable date
maxDate (String|Date|Moment) Maximum selectable date
currentDate (String|Date|Moment) Initial Date
year Boolean true => Has Yearpicker
date Boolean true => Has Datepicker
disabledDays Array Array containing day indices (1-7) to disable
time  Boolean         true => Has Timepicker
clearButtonBoolean true => Show Clear Button
nowButton  Boolean true => Show Now Button
switchOnClick Boolean true => Switch view on click (default: false)
cancelText  String Text for the cancel button (default: Cancel)
okText  String Text for the OK button (default: OK)
clearText  String Text for the Clear button (default: Clear)
nowText String Text for the Now button (default: Now)
triggerEvent         String Event to fire the calendar (default: focus)
monthPicker Boolean true => Act as monthpicker (hide calendar) (default: false)
事件:
名称
beforeChange event, date OK button is clicked
  change event, date OK button is clicked and input value is changed
yearSelected event, date New year is selected
dateSelected event, date New date is selected
open event datepicker is opened
  close event datepicker is closed

方法:
  1. $('input').bootstrapMaterialDatePicker('setDate', moment());
复制代码

名称 描述描述
setDate (String|Date|Moment) Set initial date
setMinDate (String|Date|Moment) Set minimum selectable date
setMaxDate (String|Date|Moment) Set maximum selectable date
destroy null Destroy the datepicker



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|知识学习 ( 鲁ICP备20015483号 )

GMT+8, 2024-5-18 21:52 , Processed in 0.073585 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表