| 147 | Accepts a datetime or a string: |
| 148 | |
| 149 | >>> w.render('mydate', datetime.date(2010, 4, 15)) == w.render('mydate', '2010-04-15') |
| 150 | True |
| 151 | |
| 152 | Invalid dates still render the failed date: |
| 153 | >>> print w.render('mydate', '2010-02-31') |
| 154 | <select name="mydate_month"> |
| 155 | <option value="1">January</option> |
| 156 | <option value="2" selected="selected">February</option> |
| 157 | <option value="3">March</option> |
| 158 | <option value="4">April</option> |
| 159 | <option value="5">May</option> |
| 160 | <option value="6">June</option> |
| 161 | <option value="7">July</option> |
| 162 | <option value="8">August</option> |
| 163 | <option value="9">September</option> |
| 164 | <option value="10">October</option> |
| 165 | <option value="11">November</option> |
| 166 | <option value="12">December</option> |
| 167 | </select> |
| 168 | <select name="mydate_day"> |
| 169 | <option value="1">1</option> |
| 170 | <option value="2">2</option> |
| 171 | <option value="3">3</option> |
| 172 | <option value="4">4</option> |
| 173 | <option value="5">5</option> |
| 174 | <option value="6">6</option> |
| 175 | <option value="7">7</option> |
| 176 | <option value="8">8</option> |
| 177 | <option value="9">9</option> |
| 178 | <option value="10">10</option> |
| 179 | <option value="11">11</option> |
| 180 | <option value="12">12</option> |
| 181 | <option value="13">13</option> |
| 182 | <option value="14">14</option> |
| 183 | <option value="15">15</option> |
| 184 | <option value="16">16</option> |
| 185 | <option value="17">17</option> |
| 186 | <option value="18">18</option> |
| 187 | <option value="19">19</option> |
| 188 | <option value="20">20</option> |
| 189 | <option value="21">21</option> |
| 190 | <option value="22">22</option> |
| 191 | <option value="23">23</option> |
| 192 | <option value="24">24</option> |
| 193 | <option value="25">25</option> |
| 194 | <option value="26">26</option> |
| 195 | <option value="27">27</option> |
| 196 | <option value="28">28</option> |
| 197 | <option value="29">29</option> |
| 198 | <option value="30">30</option> |
| 199 | <option value="31" selected="selected">31</option> |
| 200 | </select> |
| 201 | <select name="mydate_year"> |
| 202 | <option value="2007">2007</option> |
| 203 | <option value="2008">2008</option> |
| 204 | <option value="2009">2009</option> |
| 205 | <option value="2010" selected="selected">2010</option> |
| 206 | <option value="2011">2011</option> |
| 207 | <option value="2012">2012</option> |
| 208 | <option value="2013">2013</option> |
| 209 | <option value="2014">2014</option> |
| 210 | <option value="2015">2015</option> |
| 211 | <option value="2016">2016</option> |
| 212 | </select> |
| 213 | |