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

Customer text input parser #106

Closed
NikolajDL opened this issue Aug 11, 2022 · 4 comments
Closed

Customer text input parser #106

NikolajDL opened this issue Aug 11, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@NikolajDL
Copy link

NikolajDL commented Aug 11, 2022

Hi,

I'm using the timepicker and have text input enabled. I want to allow multiple ways to enter the time, i.e. using both the HHmm format and the HH:mm format. Is there a way to configure multiple patterns for parsing the text input - or alternatively, replace the default text parser with my own?

Here is how my timepicker is configured:

<VDatepicker
  time-picker
  v-model="myTime"
  :text-input="true"
  :text-input-options="timeTextInputOptions"
/>
 
...

const timeTextInputOptions = ref({
  format: 'HHmm',
});

With this configuration, I can enter 1230 and it'll turn into 12:30.
I cannot enter 12:30 though - or even just change the minute part. It'll just ignore the input altogether and eventually reset to the previously valid time.

I want to be able to parse by both patterns. How can I do that?

@Jasenkoo Jasenkoo added the enhancement New feature or request label Aug 12, 2022
@Jasenkoo
Copy link
Contributor

Not right now, will see to add it.

@NikolajDL
Copy link
Author

Sounds good. I'd be willing to put in a PR for it, if that'll help speed up the process? :-)
I have a customer breathing down my neck for this particular feature.

@Jasenkoo
Copy link
Contributor

Should be published today or tomorrow.

@NikolajDL
Copy link
Author

Excellent! Thank you for the fast response.

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

No branches or pull requests

2 participants