how to use jquery for date picker
please help
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
sorry for that but I am going to use that for django
thanks
if your files are in /sitemedia/ and the datefield is named
date_of_certification
<link href="/sitemedia/css/jquery-ui.css" rel="stylesheet"
type="text/css"/>
<script src="/sitemedia/js/jquery.min.js"></script>
<script src="/sitemedia/js/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#id_date_of_certification").datepicker({ dateFormat:
'yy-mm-dd'});
});
</script>
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/
<script type="text/javascript" src="{% url jsi18n %}"></script>
<script type="text/javascript" src="{{ ADMIN_MEDIA_PREFIX
}}/js/core.js"></script>
<script type="text/javascript">window.__admin_media_prefix__ = "{{
ADMIN_MEDIA_PREFIX|escapejs }}";</script>
<link href="{{ ADMIN_MEDIA_PREFIX }}/css/widgets.css"
type="text/css" media="all" rel="stylesheet" />
{{ form.media }}
Then modify your form to use the admin date picker widget:
from django.contrib.admin.widgets import AdminDateWidget
class MyForm(forms.Form):
some_date = forms.DateField(widget=AdminDateWidget())
if you had been following the thread, he wants to implement this outside
admin.