You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Barry Books <tr...@gmail.com> on 2013/10/01 13:26:40 UTC

5.4 Datepicker survey

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

Re: 5.4 Datepicker survey

Posted by Yunhua Sang <yu...@gmail.com>.
I'd like to go with Michal's, love the time option.

Thanks a lot for working on it.

Yunhua


On Tue, Oct 1, 2013 at 4:37 PM, Lenny Primak <lp...@hope.nyc.ny.us> wrote:

> I would go with JQueryUI datepicker.  It looks great and doesn't even
> depend of bootstrap version or even has bootstrap dependency. I also looked
> at number of bootstrap datepicker sand the JQUeryUI one looks better and
> has more options than all of them.
>
> > On Oct 1, 2013, at 4:26 AM, Barry Books <tr...@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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: 5.4 Datepicker survey

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
I would go with JQueryUI datepicker.  It looks great and doesn't even depend of bootstrap version or even has bootstrap dependency. I also looked at number of bootstrap datepicker sand the JQUeryUI one looks better and has more options than all of them. 

> On Oct 1, 2013, at 4:26 AM, Barry Books <tr...@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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.4 Datepicker survey

Posted by Michał Gruca <mi...@gmail.com>.
Hi,
I'm currently using fork of bootstrap datepicker
http://tarruda.github.io/bootstrap-datetimepicker/
It's advantage is that you may use time picker if you need it. The sad part
is that it's not compatible with bootstrap 3. I've tweaked it a bit, so
it's working, but it doesn't look good.

Good part about it, is that it's really easily configurable (even such .js
anti-talent as myself was able to work with it)

Regards,
Michal


On Tue, Oct 1, 2013 at 2:37 PM, Bård Magnus Kvalheim <ma...@kvalheim.eu>wrote:

> 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-datepickerand
> 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 <tr...@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
> >
>



-- 
Pozdrawiam
Michał Gruca

-----------------------------------------------
Kontakt:
kom: 504-148-568
@: michalgruca@gmail.com
blog: htttp://www.rits.pl

Re: 5.4 Datepicker survey

Posted by Bård Magnus Kvalheim <ma...@kvalheim.eu>.
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 <tr...@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
>