| 219 | >>> w = SelectDateWidget(years=('2007','2008','2009','2010','2011','2012','2013','2014','2015','2016'), required=False) |
| 220 | >>> print w.render('mydate', '') |
| 221 | <select name="mydate_month" id="id_mydate_month"> |
| 222 | <option value="0">---</option> |
| 223 | <option value="1">January</option> |
| 224 | <option value="2">February</option> |
| 225 | <option value="3">March</option> |
| 226 | <option value="4">April</option> |
| 227 | <option value="5">May</option> |
| 228 | <option value="6">June</option> |
| 229 | <option value="7">July</option> |
| 230 | <option value="8">August</option> |
| 231 | <option value="9">September</option> |
| 232 | <option value="10">October</option> |
| 233 | <option value="11">November</option> |
| 234 | <option value="12">December</option> |
| 235 | </select> |
| 236 | <select name="mydate_day" id="id_mydate_day"> |
| 237 | <option value="0">---</option> |
| 238 | <option value="1">1</option> |
| 239 | <option value="2">2</option> |
| 240 | <option value="3">3</option> |
| 241 | <option value="4">4</option> |
| 242 | <option value="5">5</option> |
| 243 | <option value="6">6</option> |
| 244 | <option value="7">7</option> |
| 245 | <option value="8">8</option> |
| 246 | <option value="9">9</option> |
| 247 | <option value="10">10</option> |
| 248 | <option value="11">11</option> |
| 249 | <option value="12">12</option> |
| 250 | <option value="13">13</option> |
| 251 | <option value="14">14</option> |
| 252 | <option value="15">15</option> |
| 253 | <option value="16">16</option> |
| 254 | <option value="17">17</option> |
| 255 | <option value="18">18</option> |
| 256 | <option value="19">19</option> |
| 257 | <option value="20">20</option> |
| 258 | <option value="21">21</option> |
| 259 | <option value="22">22</option> |
| 260 | <option value="23">23</option> |
| 261 | <option value="24">24</option> |
| 262 | <option value="25">25</option> |
| 263 | <option value="26">26</option> |
| 264 | <option value="27">27</option> |
| 265 | <option value="28">28</option> |
| 266 | <option value="29">29</option> |
| 267 | <option value="30">30</option> |
| 268 | <option value="31">31</option> |
| 269 | </select> |
| 270 | <select name="mydate_year" id="id_mydate_year"> |
| 271 | <option value="0">---</option> |
| 272 | <option value="2007">2007</option> |
| 273 | <option value="2008">2008</option> |
| 274 | <option value="2009">2009</option> |
| 275 | <option value="2010">2010</option> |
| 276 | <option value="2011">2011</option> |
| 277 | <option value="2012">2012</option> |
| 278 | <option value="2013">2013</option> |
| 279 | <option value="2014">2014</option> |
| 280 | <option value="2015">2015</option> |
| 281 | <option value="2016">2016</option> |
| 282 | </select> |
| 283 | >>> print w.render('mydate', '2010-04-15') |
| 284 | <select name="mydate_month" id="id_mydate_month"> |
| 285 | <option value="0">---</option> |
| 286 | <option value="1">January</option> |
| 287 | <option value="2">February</option> |
| 288 | <option value="3">March</option> |
| 289 | <option value="4" selected="selected">April</option> |
| 290 | <option value="5">May</option> |
| 291 | <option value="6">June</option> |
| 292 | <option value="7">July</option> |
| 293 | <option value="8">August</option> |
| 294 | <option value="9">September</option> |
| 295 | <option value="10">October</option> |
| 296 | <option value="11">November</option> |
| 297 | <option value="12">December</option> |
| 298 | </select> |
| 299 | <select name="mydate_day" id="id_mydate_day"> |
| 300 | <option value="0">---</option> |
| 301 | <option value="1">1</option> |
| 302 | <option value="2">2</option> |
| 303 | <option value="3">3</option> |
| 304 | <option value="4">4</option> |
| 305 | <option value="5">5</option> |
| 306 | <option value="6">6</option> |
| 307 | <option value="7">7</option> |
| 308 | <option value="8">8</option> |
| 309 | <option value="9">9</option> |
| 310 | <option value="10">10</option> |
| 311 | <option value="11">11</option> |
| 312 | <option value="12">12</option> |
| 313 | <option value="13">13</option> |
| 314 | <option value="14">14</option> |
| 315 | <option value="15" selected="selected">15</option> |
| 316 | <option value="16">16</option> |
| 317 | <option value="17">17</option> |
| 318 | <option value="18">18</option> |
| 319 | <option value="19">19</option> |
| 320 | <option value="20">20</option> |
| 321 | <option value="21">21</option> |
| 322 | <option value="22">22</option> |
| 323 | <option value="23">23</option> |
| 324 | <option value="24">24</option> |
| 325 | <option value="25">25</option> |
| 326 | <option value="26">26</option> |
| 327 | <option value="27">27</option> |
| 328 | <option value="28">28</option> |
| 329 | <option value="29">29</option> |
| 330 | <option value="30">30</option> |
| 331 | <option value="31">31</option> |
| 332 | </select> |
| 333 | <select name="mydate_year" id="id_mydate_year"> |
| 334 | <option value="0">---</option> |
| 335 | <option value="2007">2007</option> |
| 336 | <option value="2008">2008</option> |
| 337 | <option value="2009">2009</option> |
| 338 | <option value="2010" selected="selected">2010</option> |
| 339 | <option value="2011">2011</option> |
| 340 | <option value="2012">2012</option> |
| 341 | <option value="2013">2013</option> |
| 342 | <option value="2014">2014</option> |
| 343 | <option value="2015">2015</option> |
| 344 | <option value="2016">2016</option> |
| 345 | </select> |