secret
Created

  • Download Gist
1_source.haml
Haml
1 2
= f.input :time, as: :time_select, ampm: true, include_blank: false, minute_step: 15
= f.time_select :time
2_output.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
<li class="time_select input required" id="report_interval_attributes_time_input"><fieldset class="fragments"><input id="report_interval_attributes_time_1i" name="report[interval_attributes][time(1i)]" type="hidden" value="" /><input id="report_interval_attributes_time_2i" name="report[interval_attributes][time(2i)]" type="hidden" value="" /><input id="report_interval_attributes_time_3i" name="report[interval_attributes][time(3i)]" type="hidden" value="" /><legend class="label"><label for="report_interval_attributes_time_4i">Time<abbr title="required">*</abbr></label></legend><ol class="fragments-group"><li class="fragment"><label for="report_interval_attributes_time_4i">Hour</label><select id="report_interval_attributes_time_4i" name="report[interval_attributes][time(4i)]">
<option value="00">12 AM</option>
<option value="01">01 AM</option>
<option value="02">02 AM</option>
<option value="03">03 AM</option>
<option value="04">04 AM</option>
<option value="05">05 AM</option>
<option value="06">06 AM</option>
<option value="07">07 AM</option>
<option value="08">08 AM</option>
<option value="09">09 AM</option>
<option value="10">10 AM</option>
<option value="11">11 AM</option>
<option value="12">12 PM</option>
<option value="13">01 PM</option>
<option value="14">02 PM</option>
<option value="15">03 PM</option>
<option value="16">04 PM</option>
<option value="17">05 PM</option>
<option value="18">06 PM</option>
<option value="19">07 PM</option>
<option value="20">08 PM</option>
<option value="21">09 PM</option>
<option value="22">10 PM</option>
<option value="23">11 PM</option>
</select>
</li><li class="fragment"><label for="report_interval_attributes_time_5i">Minute</label><select id="report_interval_attributes_time_5i" name="report[interval_attributes][time(5i)]">
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
</select>
</li></ol></fieldset>
</li>
<input id="report_interval_attributes_time_1i" name="report[interval_attributes][time(1i)]" type="hidden" value="2012" />
<input id="report_interval_attributes_time_2i" name="report[interval_attributes][time(2i)]" type="hidden" value="12" />
<input id="report_interval_attributes_time_3i" name="report[interval_attributes][time(3i)]" type="hidden" value="10" />
<select id="report_interval_attributes_time_4i" name="report[interval_attributes][time(4i)]">
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option selected="selected" value="22">22</option>
<option value="23">23</option>
</select>
: <select id="report_interval_attributes_time_5i" name="report[interval_attributes][time(5i)]">
<option value="00">00</option>
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option selected="selected" value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">38</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
</select>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.