[ 
https://issues.apache.org/jira/browse/TAP5-2211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808701#comment-13808701
 ] 

Barry Books commented on TAP5-2211:
-----------------------------------

I looked at using modernizer and I don't think it supports that yet, but I 
think that's a good direction to head. From modernizr docs:

"These types can enable native datepickers, colorpickers, URL validation, and 
so on. If a browser doesn’t support a given type, it will be rendered as a text 
field. Modernizr cannot detect that date inputs create a datepicker, the color 
input create a colorpicker, and so on—it will detect that the input values are 
sanitized based on the spec. In the case of WebKit, we have received 
confirmation that sanitization will not be added without the UI widgets being 
in place."

There is an issue with the jQuery datepicker and the calendar button. Ideally 
you could use the Bootstrap calendar icon but the jQuery datepicker does not 
support that. Any other problems I'd be interesting in hearing about. Just 
create a github issue. 

The datepicker I wrote is very different than the one included in Tapestry. 
It's much better if you want every datepicker on your site to be the same 
because it's more difficult to add format types. I've found this to be a 
feature but it's not obvious when you first use it. Oddly enough it does work 
better with BeanEditForm because you can easily customize it in your AppModule. 
You can also create datatypes that map to formats which is also a nice feature. 
The only real drawback is if you want to create date formats at runtime and 
that problem could be solved if a mixing could override the textfield 
translator. 

At this point I think Thiago's suggestion my be the best one. Deprecate the 
current datepicker and provide recommendations to create your own. I'm not sure 
it's possible to create a one size fits all datepicker.




> Replace DatePicker with JQueryUI DatePicker
> -------------------------------------------
>
>                 Key: TAP5-2211
>                 URL: https://issues.apache.org/jira/browse/TAP5-2211
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Lenny Primak
>            Assignee: Thiago H. de Paula Figueiredo
>              Labels: datefield, datepicker
>
> The current 3rd party datepicker used by Tapestry is very old,
> and isn't very good.  It's time to update it to one of
> the better currently-available datepickers.
> There are about 15 unresolved issues opened against Datepicker that can all 
> be solved by just replacing it.
> I suggest JQueryUI datepicker (if JQuery is included as the default stack)
> The current datepicker can be left alone is prototype is chosen.
> By default, JQueryUI datepicker should be used with the button-to-activate 
> option so that it looks similar to the current datepicker.
> It should also work properly in BeanEditor and friends and even look good 
> with form-horizontal version of BeanEditor
>  



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to