material-ui-time-picker icon indicating copy to clipboard operation
material-ui-time-picker copied to clipboard

New props, functionalities and behaviour

Open Serg4554 opened this issue 6 years ago • 10 comments

Hello! I needed some extra functionalities for my project and I thought that it could be useful for others, so here is the pull request :)

  • minutesStep property (number) Allows to choose the steps between minutes, so for instance, if you need to allow times only each 5 minutes, just set minutesStep={5}
  • cancelOnClose property (bool) Allows to decide if the time is cancelled or saved when background is clicked
  • inputClasses property (object) Allows to apply classes to input form (only TimePicker was supported)
  • Calling onChange when time changes The time is updated (onChange is called) whenever the time is changed and return the init date when is cancelled

I hope you find it useful 😃👍

Serg4554 avatar Aug 20 '18 12:08 Serg4554

Coverage Status

Coverage decreased (-2.9%) to 93.286% when pulling bb0997252eb76702825397f3f27793153d301912 on Serg4554:minutes-steps-and-onchange-update into 79b29dfe2f5770f99b401091791169cc317a1fb6 on TeamWertarbyte:master.

coveralls avatar Aug 20 '18 16:08 coveralls

@Serg4554 I'm sorry I didn't see this earlier! This is an awesome first contribution, thank you so much! :tada:

I'd rename cancelOnClose to selectOnClose. :thinking: What do you think?

leMaik avatar Sep 13 '18 18:09 leMaik

Thanks to you for this awesome component! About the property rename, yes, no problem, I agree 👍

Serg4554 avatar Sep 13 '18 19:09 Serg4554

Than you very much for taking the time to review all changes. Right now I'm developing a project against the clock 😅, but as soon as I finish I will try to leave it perfect 👌

Serg4554 avatar Sep 13 '18 19:09 Serg4554

@Serg4554 No problem, I'm happy that you'll take the time to get this PR ready to merge. :)

leMaik avatar Sep 13 '18 19:09 leMaik

@Serg4554 Do you still have time to finish this PR? Don't worry, I'll update it for you otherwise. :+1:

leMaik avatar Sep 24 '18 09:09 leMaik

@leMaik I will finish the current project that I'm working on in a month aprox. but we have very tight time, so if you could update it, I would appreciate it! Otherwise I will do it, you have my words

Serg4554 avatar Sep 24 '18 10:09 Serg4554

@leMaik All changes we discussed are done, I hope you find them fine and useful! But the coverage has decreased a little bit, I will thank you if you could help me with that :)

Serg4554 avatar Oct 12 '18 17:10 Serg4554

@Serg4554 Awesome! :tada: I've got this on my radar, I'll look into the tests soon (TM).

leMaik avatar Oct 29 '18 22:10 leMaik

@Serg4554 Would you mind rebasing this on top of master? I'm a bit confused by all the changes right now…

leMaik avatar Nov 03 '18 19:11 leMaik