禁用周末以选择InfoPath日期和时间而不进行编码 [英] Disable Weekends to Select In An InfoPath Date and Time Without Coding

查看:92
本文介绍了禁用周末以选择InfoPath日期和时间而不进行编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在寻找一种在InfoPath日期和时间选择器中禁用周末的解决方案.

I am looking for a solution to disable the weekends in the InfoPath Date and Time Picker.

在没有编码解决方案的情况下有可能吗?

Is this possible without a coding solution?

感谢和问候,
Chiranthaka

Thanks and regards,
Chiranthaka

推荐答案

Chiranthaka,

Hi Chiranthaka,

没有OOB方法可以更改InfoPath中的日期和时间选择器控件.

There is no OOB method to change the Date and Time picker control in InfoPath.

作为替代方案,我建议您向此控件添加验证规则,以限制仅选择工作日的用户.

As an alternative, I recommend you adding a validation rule to this control to limit users only selecting weekdays.

步骤如下:

1.添加一个类型为验证"的规则.

1.Add a rule which type is Validation.

2.在条件部分,添加如下规则:

2.In the condition section, add rules as below:

在两个表达式部分中,键入XPath函数以查找星期几:(用您自己的列名更改"field1",例如:"Time Date",您需要更改为"Time_x0020_Date")

In the two expression section, type the XPath function to find the week of the day: ( change "field1" with your own column name, eg: "Time Date", you need change to "Time_x0020_Date")

(number(substring(../my:field1,9,2))+ number(number(substring(../my:field1,1,4))-floor((14-number(substring(. ./my:field1,6,2)))div 12))+ floor(number(number(substring(../my:field1,1,4))-floor((14-number(substring(../我的:field1, 6,2)))div 12))div 4)-floor(number(number(substring(../my:field1,1,4)))-floor((14-number(substring(../my:field1, ,6,2)))div 12))div 100)+ floor(number(number(substring(../my:field1,1,4)))-floor((14-number(substring(../my:栏位1、6、2))) div 12))div 400)+ floor(31 * number(number(substring(../my:field1,6,2))+ 12 * floor((14-number(substring(../my:field1,6 ,2)))div 12)-2)div 12))mod 7 +1 ="1/7"

(number(substring(../my:field1, 9, 2)) + number(number(substring(../my:field1, 1, 4)) - floor((14 - number(substring(../my:field1, 6, 2))) div 12)) + floor(number(number(substring(../my:field1, 1, 4)) - floor((14 - number(substring(../my:field1, 6, 2))) div 12)) div 4) - floor(number(number(substring(../my:field1, 1, 4)) - floor((14 - number(substring(../my:field1, 6, 2))) div 12)) div 100) + floor(number(number(substring(../my:field1, 1, 4)) - floor((14 - number(substring(../my:field1, 6, 2))) div 12)) div 400) + floor(31 * number(number(substring(../my:field1, 6, 2)) + 12 * floor((14 - number(substring(../my:field1, 6, 2))) div 12) - 2) div 12)) mod 7 + 1 ="1/7"

在"="之后请注意不同的数字

Pay attention different number after "="

3.键入屏幕提示,然后保存.

3.Type the screentip and then save.

4.当我们选择周末日期和时间时,将出现屏幕提示,我们需要更改为工作日.

4.When we select the weekend date &time, the screentip will appear, we need to change to weekdays.

最诚挚的问候,

王race(Grace Wang)

Grace Wang


这篇关于禁用周末以选择InfoPath日期和时间而不进行编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆