New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added type=number for input elements #257
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much, I like it 👍 Lat and long could also be set to type="number"
.
index.html
Outdated
@@ -52,17 +52,17 @@ | |||
<p> | |||
<script type="text/javascript"> | |||
document.write('<span class="hd">' + i18n.t('words.date') + ' ' + i18n.t('words.and') + ' ' + i18n.t('words.time.time') + ':</span>'); | |||
document.write('<input id="dd" size="3" name="dd" value="02" onblur="Evaluate()"/>.'); | |||
document.write('<input type="number" step="1" min="0" max="31" id="dd" size="3" name="dd" value="02" onblur="Evaluate()"/>.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why min="0"
:) ?
index.html
Outdated
  | ||
<input size="3" name="HH" value="22" onblur="Evaluate()" />:<input size="3" name="MM" value="21" onblur="Evaluate()" /> | ||
<input type="number" step="1" min="0" max="24" size="3" name="HH" value="22" onblur="Evaluate()" />:<input type="number" step="1" min="0" max="59" size="3" name="MM" value="21" onblur="Evaluate()" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Max would be max="23"
.
I changed lat/lon to number, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. I tested it locally and it required some CSS changes so that it does not look to bad (the tool needs rework). I fixed it and referenced this PR so you can check it out when you are curious. Thanks again. The change is in production :)
Works nice on my mobile. Thanks for fixing my untested work :) |
gives direct number keyboard on mobile
also added step, min, max