以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  日期列中月份选择  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=65252)

--  作者:一笑
--  发布时间:2015/3/12 14:25:00
--  日期列中月份选择
在实际工作中需要只录入日期的月份而不需要日,发现内置输入器无法选择,直接输入也不行,能实现此类输入吗?谢谢
--  作者:Bin
--  发布时间:2015/3/12 14:28:00
--  
用字符串列吧

然后用格式限制


datacolchanging 事件

if e.datacol.name="日期" then
   if System.Text.RegularExpressions.Regex.isMatch(e.newValue,"[0-9]{4}-(0[0-9]{1})|(1[1-2]{1})" then
        e.cancel=true
   end if
end if