开发者

Masking Date field in gwt

Is there is any way in GWT where date field can be masked with various date formats? http://digitalbush.com/projects/masked-input-plugin (in demo tab)

I came 开发者_如何学Cacross solutions where in formatting can be applied on loosing the focus with Regex, which is not preferred.

TextfieldMask Plugin in gxt doesn't support date fields. I tried to tweak that little but running into lots of issues.

I explored options of gquery-(JQuery implementation for GWT), that doesnt support mask as of now.

Any suggestions/ideas?


You can use JSNI to write a masking function using the jQuery masked input plugin

    public static native void redirect(String id)/*-{
           jQuery(function($){
              $("#"+id).mask("yourmask");
           });
    }-*/;

Then attach a listener to the render event of the panel/form/etc and call the JSNI method.

See if that works

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜