日期格式的输入掩码dd / mm / yyyy hh\:nn [英] Input Mask for dateformat dd/mm/yyyy hh\:nn

查看:663
本文介绍了日期格式的输入掩码dd / mm / yyyy hh\:nn的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,


我有一个日期字段,有时候也应该存储小时和分钟,以及格式和输入掩码后使用




dd / mm / yyyy hh \:nn

09/09 / 0000 \ 99:99; 0; *

打字日期,小时和分钟都可以。

但我希望能够在12122005之后的日期部分停止并且

enterkey给12 / 12/2005 00:00

但这会触发错误''您输入的值对此字段无效

''


是否可以创建一个接受跳过小时的输入掩码和

分钟?


谢谢,

菲利普

Dear all,

I have a datefield that sometimes should store hours and minutes too ans use
following format and inputmask.

dd/mm/yyyy hh\:nn

09/09/0000\ 99:99;0;*

Typing date, hour and minutes is OK.
But i would like to be able to stop after the date-part like 12122005 and
enterkey giving 12/12/2005 00:00
But this triggers an error ''The value you entered isn''t valid for this field
''

Is it possible to create a inputmask that accepts skipping the hour and
minutes ?

thanks,

Filip

推荐答案

简单回答 - 输入面具是邪恶的。不要使用输入面具。


周六,2005年12月17日10:26:26 GMT,Filips Benoit < be *********** @ pandora.be>

写道:
Simple answer - input masks are evil. Don''t use input masks.

On Sat, 17 Dec 2005 10:26:26 GMT, "Filips Benoit" <be***********@pandora.be>
wrote:
亲爱的,
以下格式和输入掩码。

dd / mm / yyyy hh\:nn
09/09 / 0000 \ 99:99; 0; *

打字日期,时间和分钟都可以。
但是我希望能够在日期之后停下来像12122005和
enterkey给12/12/2005 00:00
但这会触发错误''你输入的值对这个字段无效
''

是否可以创建一个接受跳过小时和
分钟的输入掩码?

谢谢,

Filip
Dear all,

I have a datefield that sometimes should store hours and minutes too ans use
following format and inputmask.

dd/mm/yyyy hh\:nn

09/09/0000\ 99:99;0;*

Typing date, hour and minutes is OK.
But i would like to be able to stop after the date-part like 12122005 and
enterkey giving 12/12/2005 00:00
But this triggers an error ''The value you entered isn''t valid for this field
''

Is it possible to create a inputmask that accepts skipping the hour and
minutes ?

thanks,

Filip






如果我不使用输入掩码,我可以输入:


2005-12-17


或者我可以进入


2005-12-17 09:00

If I don''t use an input mask I can enter:

2005-12-17

or I can enter

2005-12-17 09:00


好的,但是


没有输入掩码>你必须键入4个额外的字符:2 - 1个空格和1:


inputmask>你必须在最后键入4个零'额外


我仍​​然喜欢输入掩码,因为它清楚地显示了什么类型的日期应该输入
并且捕获inputmask-error可以给出明确的错误消息!


Filip

" Lyle Fairfield" < LY *********** @ aim.com>在消息中写道

news:11 ********************** @ g44g2000cwa.googlegr oups.com ...
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:

inputmask > you have to type 4 zero''s extra at the end

I still prefere an inputmask since it shows clearly what type of date should
be input
And trapping inputmask-error can give a clear errormessage !

Filip
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
如果我不使用输入面具我可以进入:

2005-12-17

或者我可以进入
2005-12-17 09:00
If I don''t use an input mask I can enter:

2005-12-17

or I can enter

2005-12-17 09:00



这篇关于日期格式的输入掩码dd / mm / yyyy hh\:nn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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