Skip to content
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

Merged
merged 2 commits into from Apr 15, 2018

Conversation

HolgerJeromin
Copy link

gives direct number keyboard on mobile
also added step, min, max

@ypid ypid self-assigned this Apr 13, 2018
@ypid ypid added type: feature Introduction of new functionality. impact: browser labels Apr 13, 2018
@ypid ypid added this to the v3.6.0 milestone Apr 13, 2018
Copy link
Member

@ypid ypid left a 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()"/>.');
Copy link
Member

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
&#160;
<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()" />
Copy link
Member

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".

@HolgerJeromin
Copy link
Author

I changed lat/lon to number, too.

Copy link
Member

@ypid ypid left a 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 :)

@ypid ypid merged commit 14138d1 into opening-hours:master Apr 15, 2018
ypid added a commit that referenced this pull request Apr 15, 2018
@HolgerJeromin HolgerJeromin deleted the patch-1 branch April 15, 2018 17:55
@HolgerJeromin
Copy link
Author

Works nice on my mobile. Thanks for fixing my untested work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: browser type: feature Introduction of new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants