Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加配置项,使日期选择更加灵活 #79

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

增加配置项,使日期选择更加灵活 #79

wants to merge 3 commits into from

Conversation

yimijianfang
Copy link

使用方法配置项中新增以下参数
notAllowDays: ['2018-10-08', '2018-10-19', '2018-10-18']
allowDays: ['2018-10-08', '2018-10-19', '2018-10-18']
notAllowDays 不允许选择日期
allowDays 仅支持选择日期

应用场景

  1. 节假日选择或排除
  2. 业务场景需求在min:-7 到max:7再排除周末
  3. 根据接口允许选择指定日期

liuning added 3 commits October 18, 2018 10:44
应用场景为节假日选择和业务相关,由后台返回。更加灵活
取两个集合交集
@ugdot
Copy link

ugdot commented Nov 15, 2018

confirm: function(){
if(options.range){
if(!that.endDate) return that.hint('请先选择日期范围');
if(lay(btn).hasClass(DISABLED)) return that.hint(
options.type === 'time' ? TIPS_OUT.replace(/日期/g, '时间') : TIPS_OUT
);
} else {
if(lay(btn).hasClass(DISABLED)) return that.hint('不在有效日期或时间范围内');
}
that.done();
that.setValue(that.parse()).remove()
}
};

这里,在done中无法重新赋值,建议把that.done(); 放到 that.setValue(that.parse()).remove() 后面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants