-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Break up timepicker's model into separate values #5957
Comments
@wesleycho since I'm looking into timepicker in the context of https://github.com/ng-bootstrap/ng-bootstrap I would like to brainstorm here. I totally agree that using
At the end of the day we want sth like:
Thought? |
I'm a fan of using an object (second option), that way it is a nice & expected structure, and simple enough for a user to work with (i.e. modifying a date object with the time values to submit to a server). Allowed values - we should validate that the object is explicitly as we expect (predefined data structure). |
I agree. Let's start with this. We could always add more formats as we go. |
I too agree we could use the object. I think it is more flexible. |
specific Issues (individually closed) to address in rewrite:
|
I am looking to rewrite my time tracking utility with ng. At the moment I have time and date tied together so when you push time back beyond 'zero' date will update accordingly to day before. In other words script will update date values if you're pushing time over date boundaries. For me it is very useful to have this two tied together (time and date) because I think this is more natural behavior for this type of objects. I don't have a plunker here but you can try this on my demo 'Add Time Entry' button. |
@alcalbg this is something you would best manage yourself and it's not that hard. Using the same |
I do second the notion of using an object for the input per my thumbs-up above. I will suggest, though, that the object should continue to use a defined subset of JS |
Is there any eta? This bug is making me trouble 6088 |
Any status on this? Relying on the Date object is definitely suboptimal. |
This change is to break up the model into separate values, i.e. hours, minutes, and seconds. This is to fix date related issues for a component that shouldn't rely on date objects at all.
The text was updated successfully, but these errors were encountered: