On 10/10/07, Dave <demsulli
...@gmail.com> 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 %-)