djangosnippets.org: Latest snippets posted by silent1mezzohttps://djangosnippets.org/users/silent1mezzo/2011-02-08T16:16:29.641899-06:00silent1mezzoDjango Number Input
2011-02-08T16:16:29.641899-06:00silent1mezzohttps://djangosnippets.org/snippets/2354/<p>This will give you a <input type='number'> field.
</p>
<p>This is helpful when you want to use HTML5 for newer browsers. Older browsers will just interpret this as <input type='text'>
</p>
Freely redistributableSelectDateWidget
2010-12-15T16:08:16.139743-06:00silent1mezzohttps://djangosnippets.org/snippets/2289/<p>This widget will produce a select box with the range of dates that you input.</p>
<p><strong>Usage:</strong></p>
<p><code>widget=SelectDateWidget('2010-12-15', '2010-12-20')</code></p>
<p><strong>Output:</strong></p>
<p>`<select></p>
<p><option value="2010-12-15">Wed January 01, 2010</option></p>
<p><option value="2010-12-16">Thu January 02, 2010</option></p>
<p><option value="2010-12-17">Fri January 03, 2010</option></p>
<p><option value="2010-12-18">Sat January 04, 2010</option></p>
<p><option value="2010-12-19">Sun January 05, 2010</option></p>
<p><option value="2010-12-20">Mon January 06, 2010</option> …</p>
Freely redistributable