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

fix(bindInput): convert numbers for input[type=number] #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vdegenne
Copy link

@vdegenne vdegenne commented Jan 10, 2025

I also rearranged the code responsible for checking the type so it will work better with custom elements, for instance <md-outlined-text-field type="number">... will naturally work now and not just for <input type="number">

All tests passed 100%

case 'number':
case 'date':
case 'time':
value = element.valueAsNumber;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date/time are an odd one

i wonder if we should be exposing it as a Date (via valueAsDate), or if not, keep it as a string. a number seems unexpected since value will be a date/time string on the native input

so i think it should be a string or a date but not a number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants