This is great news and good timing. We're currently in process of making a
5.4 migration and will soon be in the market for a datepicker as well.

Have been looking at https://github.com/eternicode/bootstrap-datepicker and
seems like there are some efforts to bring it up to speed with bootstrap 3
https://github.com/eternicode/bootstrap-datepicker/pull/649

Don't know how far I get this week, but will let you know.

Would definitely take yours for a spin if you get things working as well.

cheers
Magnus

On Tue, Oct 1, 2013 at 1:26 PM, Barry Books <trs...@gmail.com> wrote:

> I'm trying to find a suitable javascript implementation for a 5.4
> datepicker. There are several Bootstrap datapickers but I have not found
> one that's really compatible with the release version of Bootstrap 3. So
> far I've looked at
>
> https://github.com/angular-ui/bootstrap
>
> https://github.com/ianserlin/bootstrap-datepicker
>
> https://github.com/eternicode/bootstrap-datepicker
>
> http://jqueryui.com/datepicker/
>
> Has anyone see any other interesting ones or have any opinions?
>
>
> Implementation Plan:
>
> The datepicker will be implemented in two parts. The first part consists of
> a Date Translator that is used with the TextField component. The only thing
> required is
>
> java
>
> @Property
> private Date date;
>
> tml
>
> <t:textField value="date"/>
>
> It's possible to contribute alternate date translators and refer to them by
> name
>
> <t:textFile value="date" translate="(mm/dd/yyyy)" />
>
> The good:
>
> The server side code is simple. The only thing that's required is the
> translator.
> Translators can write into the HTML stream and include the format like
> <input type="date" data-date-format="mm/dd/yyyy" />
> I think it should be possible to have <t:textField type="hidden"
> value="date"/> and hide the date format from the user.
> It does not work like the current DateField.
>
> The bad:
> You have to write a date translator for every format and data type. The
> format could be fixed by creating a prefix like
> dateTranslater:mm-dd-yyyy and converting the date format into a
> FieldTranslator (does anyone think this would be useful?). The second
> problem has two parts. The first issue is if you want to use Calendar
> instead of Date you need a new Translator. The second problem/feature is
> the data type determines the format. If you want both a datetime picker and
> a date picker it's best to have two different object types. For a
> datetimepicker I'm leaning toward the java.sql.Timestamp type. Lastly it
> does not work like the current DateField.
>
>
> The client side is accomplished with a mixin. With Bootstrap style
> javascript the only thing the mixin does is include the javascript and add
> data-provider="datepicker" to the element. The good thing about this is
> it's easy to swap out the Javascript client (except they all have different
> data- parameters).
>
> To override the existing DateField you just create your own DateField
> component like this
>
> *public* *class* DateField *extends* TextField {
>
>  @Mixin
>
> *private* DateFieldMixin mixin;
>
>
> }
>
>
> I've got a few prototypes running and I'm expecting to have something
> finished by the end of the week. Any feedback would be helpful.
>
>
> Thanks
>
> Barry
>

Reply via email to