feat(laydate): 新增 disabledDate, disabledTime 选项 (#1569)

* feat(laydate): 新增 `disabledDate`, `disabledTime` 选项

feat(laydate): 优化年、月面板的禁用检测

refactor: 简化代码

fix: 修复 4d7ae6e 造成的按钮检测 BUG

options.disabledDate 中不应携带时分秒信息

fix(laydate): 修复范围联动模式, 右侧面板检测另外一个日期有效范围错误, 导致无法标记范围的问题

2.8.0 ~ 2.9.4 均有此问题

feat: disabledTime 返回值改为对象,简化写法

docs: 添加文档

feat: 优化点击确定按钮时的提示

fix: 修复一些边界情况

docs: typo

refactor: 优化年月禁用

refactor: 优化确定按钮 hint

chore: typo

docs: update

* refactor: 优化代码结构

* refactor: 优化 disabledTime,减少不必要的计算

* chore(laydate): 使用 prettier 格式化头部代码

* docs(laydate): 补充新选项文档描述

---------

Co-authored-by: 贤心 <3277200+sentsim@users.noreply.github.com>
This commit is contained in:
morning-star
2024-03-31 14:33:47 +08:00
committed by GitHub
parent b7686d2228
commit e1562bdb48
4 changed files with 354 additions and 42 deletions

View File

@@ -139,6 +139,7 @@ html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
.layui-laydate .layui-this,.layui-laydate .layui-this>div{background-color: #16baaa !important; color: #fff !important;}
.layui-laydate .laydate-disabled,
.layui-laydate .laydate-disabled:hover{background:none !important; color: #d2d2d2 !important; cursor: not-allowed !important; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;}
.layui-laydate .layui-this.laydate-disabled,.layui-laydate .layui-this.laydate-disabled>div{background-color: #eee !important}
.layui-laydate-content td>div{padding: 7px 0;height: 100%;}
/* 墨绿/自定义背景色主题 */