DateTimeField

5 Messages Forum Options Options
Embed this topic
Permalink
Chauvet Etienne | ARTIFICA
DateTimeField
Reply Threaded MoreMore options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
 I've this :
 
DateTimeField('date',
            default= DateTime(),
            widget=CalendarWidget(description='Enter a value for Contenu.',
                date_only=1,
                show_hm=False,
                description_msgid='Publication_help_Contenu',
                i18n_domain='Publication',
                label='date',
                label_msgid='Publication_label_Contenu',
            ),
        ),
I've read that show_hm is not supported.
But i'de like to just have date (not the time)
Luca Olivetti
Re: DateTimeField
Reply Threaded MoreMore options
Print post
Permalink
En/na Chauvet Etienne | ARTIFICA ha escrit:

>  I've this :
>  
> DateTimeField('date',
>             default= DateTime(),
>             widget=CalendarWidget(description='Enter a value for Contenu.',
>                 date_only=1,
>                 show_hm=False,
>                 description_msgid='Publication_help_Contenu',
>                 i18n_domain='Publication',
>                 label='date',
>                 label_msgid='Publication_label_Contenu',
>             ),
>         ),
> I've read that show_hm is not supported.

It works here (plone 2.1.1), at least for edit (I use a custom widget
for show).
Looking at the standard widget I see that you can use 'format' for
display, e.g.

DateTimeField('date',
             default= DateTime(),
             widget=CalendarWidget(description='Enter a value for Contenu.',
                 format='%d/%m/%Y',
                 show_hm=False,
                 description_msgid='Publication_help_Contenu',
                 i18n_domain='Publication',
                 label='date',
                 label_msgid='Publication_label_Contenu',
             ),
         ),


Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Chauvet Etienne | ARTIFICA
Re: DateTimeField
Reply Threaded MoreMore options
Print post
Permalink



> En/na Chauvet Etienne | ARTIFICA ha escrit:
>>  I've this :
>>  DateTimeField('date',
>>             default= DateTime(),
>>             widget=CalendarWidget(description='Enter a value for
>> Contenu.',
>>                 date_only=1,
>>                 show_hm=False,
>>                 description_msgid='Publication_help_Contenu',
>>                 i18n_domain='Publication',
>>                 label='date',
>>                 label_msgid='Publication_label_Contenu',
>>             ),
>>         ),
>> I've read that show_hm is not supported.
>
> It works here (plone 2.1.1), at least for edit (I use a custom widget for
> show).
> Looking at the standard widget I see that you can use 'format' for
> display, e.g.
>
> DateTimeField('date',
>             default= DateTime(),
>             widget=CalendarWidget(description='Enter a value for
> Contenu.',
>                 format='%d/%m/%Y',
>                 show_hm=False,
>                 description_msgid='Publication_help_Contenu',
>                 i18n_domain='Publication',
>                 label='date',
>                 label_msgid='Publication_label_Contenu',
>             ),
>         ),
>
>

I'm on plone 2.0.5 and it doesn't work. Do you know why ?




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Luca Olivetti
Re: DateTimeField
Reply Threaded MoreMore options
Print post
Permalink
En/na Chauvet Etienne | ARTIFICA ha escrit:

>> DateTimeField('date',
>>             default= DateTime(),
>>             widget=CalendarWidget(description='Enter a value for
>> Contenu.',
>>                 format='%d/%m/%Y',
>>                 show_hm=False,
>>                 description_msgid='Publication_help_Contenu',
>>                 i18n_domain='Publication',
>>                 label='date',
>>                 label_msgid='Publication_label_Contenu',
>>             ),
>>         ),
>>
>>
>
> I'm on plone 2.0.5 and it doesn't work. Do you know why ?

No. Probably support for this feature has been added in plone 2.1,
that's why the documentation says it isn't supported.

Bye

--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Chauvet Etienne | ARTIFICA-2
Re: DateTimeField
Reply Threaded MoreMore options
Print post
Permalink

> En/na Chauvet Etienne | ARTIFICA ha escrit:
>
>>> DateTimeField('date',
>>>             default= DateTime(),
>>>             widget=CalendarWidget(description='Enter a value for
>>> Contenu.',
>>>                 format='%d/%m/%Y',
>>>                 show_hm=False,
>>>                 description_msgid='Publication_help_Contenu',
>>>                 i18n_domain='Publication',
>>>                 label='date',
>>>                 label_msgid='Publication_label_Contenu',
>>>             ),
>>>         ),
>>>
>>>
>>
>> I'm on plone 2.0.5 and it doesn't work. Do you know why ?
>
> No. Probably support for this feature has been added in plone 2.1,
> that's why the documentation says it isn't supported.
>
> Bye


ok.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users