Re: Using the fancy date/time widget with newforms

2007-10-09 Thread Ben Ford
Hi Dave,
I believe this is what you're looking for
http://www.djangosnippets.org/snippets/391/ I had to tweek a few things to
get it to work, but it looks pretty damn good now! If it's what you want let
me know if you have any issues setting it up and I'll do my best to help ;-)
Ben

On 10/10/2007, Dave <[EMAIL PROTECTED]> wrote:
>
>
> Hey All,
>
> Is there a simple way to re-create the fancy admin date/time widget
> (with the 'Today'/'Now' buttons and the pop-up calendar) with
> newforms?
> I can see how to do it by creating a custom widget, but I thought
> perhaps there was an easier way.
>
> Thoughts?
>
>
> >
>


-- 
Regards,
Ben Ford
[EMAIL PROTECTED]
+6281317958862

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Using the fancy date/time widget with newforms

2007-10-09 Thread Russell Keith-Magee

On 10/10/07, Dave <[EMAIL PROTECTED]> wrote:
>
> Hey All,
>
> Is there a simple way to re-create the fancy admin date/time widget
> (with the 'Today'/'Now' buttons and the pop-up calendar) with
> newforms?
> I can see how to do it by creating a custom widget, but I thought
> perhaps there was an easier way.

A custom widget would be the correct approach. In fact, the widget has
already been written - it is in the newforms-admin branch in
django.contrib.admin.widgets as AdminDateWidget and AdminTimeWidget.

These admin widgets won't be directly usable in a trunk-based project
- they make use of Media defintions, which have been added in the
newforms-admin branch. However, you should be able to use them to give
you ideas on how a custom date widget should be written.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---