Re: How to add a javascript calendar to date textboxes

2007-08-08 Thread Noam Raphael

It looks great, thanks!

Noam

On 8/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've done that, and it's not hard, but there's quite a few good js
> datepickers out there, and on my most recent one I used one of
> those gives me a bit more control over how I want it to look on
> the public-facing part, and I'm not making 5 http calls to do it.
>
> Here's the one I went with:
> http://www.frequency-decoder.com/demo/date-picker-v2/
>
> And again, it's just adding a class to the input.
>
> On Aug 7, 5:45 pm, Noam <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I wanted to add a javascript calendar (like the one you have in
> > Django's admin) to a date textbox in a form.
> > I found this post, which says how to do 
> > it:http://groups.google.com/group/django-users/browse_frm/thread/3328829...
> >
> > I thought I might share with you how I did it - I think that it's
> > simpler than what's described there.
> >
> > To add the calendar, you only need to:
> >
> > 1. Make sure that the admin interface is enabled.
> > 2. Add this to the  element in your HTML template:
> >
> >  >
> > 
> > 
> > 
> > 
> >
> > Note that this assumes that your admin media sits in "/media". If it's
> > not the case, you need to replace "/media" with your admin media path.
> >
> > 3. Add an attribute class="vDateField" to your 
> > element.
> > If you're using the newforms library, you can do it by using a line
> > like this in your form definition:
> > date =
> > forms.DateField(widget=forms.TextInput(attrs={'class':"vDateField"}))
> >
> > Have a good day,
> > Noam
>
>
> >
>

--~--~-~--~~~---~--~~
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: How to add a javascript calendar to date textboxes

2007-08-08 Thread [EMAIL PROTECTED]

I've done that, and it's not hard, but there's quite a few good js
datepickers out there, and on my most recent one I used one of
those gives me a bit more control over how I want it to look on
the public-facing part, and I'm not making 5 http calls to do it.

Here's the one I went with:
http://www.frequency-decoder.com/demo/date-picker-v2/

And again, it's just adding a class to the input.

On Aug 7, 5:45 pm, Noam <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I wanted to add a javascript calendar (like the one you have in
> Django's admin) to a date textbox in a form.
> I found this post, which says how to do 
> it:http://groups.google.com/group/django-users/browse_frm/thread/3328829...
>
> I thought I might share with you how I did it - I think that it's
> simpler than what's described there.
>
> To add the calendar, you only need to:
>
> 1. Make sure that the admin interface is enabled.
> 2. Add this to the  element in your HTML template:
>
> 
> 
> 
> 
> 
>
> Note that this assumes that your admin media sits in "/media". If it's
> not the case, you need to replace "/media" with your admin media path.
>
> 3. Add an attribute class="vDateField" to your 
> element.
> If you're using the newforms library, you can do it by using a line
> like this in your form definition:
> date =
> forms.DateField(widget=forms.TextInput(attrs={'class':"vDateField"}))
>
> Have a good day,
> Noam


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



How to add a javascript calendar to date textboxes

2007-08-07 Thread Noam

Hello,

I wanted to add a javascript calendar (like the one you have in
Django's admin) to a date textbox in a form.
I found this post, which says how to do it:
http://groups.google.com/group/django-users/browse_frm/thread/3328829f1ed7f788/27557f8194b84134

I thought I might share with you how I did it - I think that it's
simpler than what's described there.

To add the calendar, you only need to:

1. Make sure that the admin interface is enabled.
2. Add this to the  element in your HTML template:







Note that this assumes that your admin media sits in "/media". If it's
not the case, you need to replace "/media" with your admin media path.

3. Add an attribute class="vDateField" to your 
element.
If you're using the newforms library, you can do it by using a line
like this in your form definition:
date =
forms.DateField(widget=forms.TextInput(attrs={'class':"vDateField"}))

Have a good day,
Noam


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---