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

Allow format string to eliminate hours #108

Closed
wsitch opened this issue Apr 6, 2020 · 1 comment
Closed

Allow format string to eliminate hours #108

wsitch opened this issue Apr 6, 2020 · 1 comment
Labels
💡 feature request Feature requests ✅ released Already released

Comments

@wsitch
Copy link

wsitch commented Apr 6, 2020

I'd like to use the vue2-timepicker for running pace times, which means I need a minute and second selector, no hours.

However if I use format="mm:ss", the dropdown shows HH | mm | ss, but as requested the selected time is shown in the input field in "mm:ss" format.

Is it possible to eliminate the HH column in the dropdown selector when the format doesn't include hours?

@phoenixwong phoenixwong added the 💡 feature request Feature requests label Apr 7, 2020
@phoenixwong
Copy link
Owner

Hi @wsitch,

Thanks for providing a detailed use case. There was a duplicate feature request (#21), but it lacks example usage, so I closed that. Now it comes with a specific scenario. I'll add it to the roadmap soon.

In the meantime, you can try hiding the "hours" column with pure CSS. I made a quick JSFiddle demo here.

In short:

<vue-timepicker class="my-timepicker" format="mm:ss"></vue-timepicker>
.my-timepicker .select-list ul.hours {
  display: none;
}

@phoenixwong phoenixwong added the 🚴 in progress Working in the beta or alpha branch label May 29, 2020
@phoenixwong phoenixwong added ✅ released Already released and removed 🚴 in progress Working in the beta or alpha branch labels May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature request Feature requests ✅ released Already released
Projects
None yet
Development

No branches or pull requests

2 participants