Show a compact year-less date in the day bar so it fits small iPhones
The native date input can't be told to drop the year, so a button face shows e.g. "Jul 10" and the real input sits hidden behind it, still holding the value and opening the native picker on tap.
This commit is contained in:
+7
-1
@@ -86,7 +86,13 @@
|
||||
<span id="bar-clock-time"></span>
|
||||
</div>
|
||||
<button type="button" id="day-prev" class="ghost" aria-label="Previous day">←</button>
|
||||
<input type="date" id="day-picker" />
|
||||
<!-- A browser won't let us shorten the text a native date input shows,
|
||||
so the face button carries a compact year-less date and the real
|
||||
input stays (visually hidden) as the value + native picker. -->
|
||||
<span class="day-date">
|
||||
<button type="button" id="day-date-face" class="ghost"></button>
|
||||
<input type="date" id="day-picker" tabindex="-1" aria-hidden="true" />
|
||||
</span>
|
||||
<button type="button" id="day-next" class="ghost" aria-label="Next day">→</button>
|
||||
<button type="button" id="day-today" class="ghost">Today</button>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user