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

Add time support for editorial metadata date field #157

Closed
danielbachhuber opened this issue Feb 14, 2013 · 7 comments · Fixed by #169
Closed

Add time support for editorial metadata date field #157

danielbachhuber opened this issue Feb 14, 2013 · 7 comments · Fixed by #169

Comments

@danielbachhuber
Copy link
Contributor

The current Edit Flow implementation allows for a date, but not a time, for first draft deadline

From http://dev.editflow.org/2013/01/31/lets-talk-v0-8-now-that-cojennin-is-helping/#comment-320

@cojennin
Copy link
Contributor

Should this be implemented in the same way you can add time to a post (two text fields a user can input hour and minutes?).

Also, I think it might now be possible to add a filter to sort by metadata date given the added filter options in #161? I'll give it a go and see.

@danielbachhuber
Copy link
Contributor Author

We're using the datepicker jQuery plugin, and there's a datetimepicker we can use instead. It would just be one text field.

We'll have to consider how to gracefully offer backwards compat so people who just want to use dates don't have their deadlines ending up at random times.

@cojennin
Copy link
Contributor

cojennin commented Mar 2, 2013

Is this the the datetime picker you were talking about? I was trying to find if you could extend the JQueryUI datepicker or if jQueryUI offered an alternative one, but I couldn't find it.

@danielbachhuber
Copy link
Contributor Author

Yep, I think that's it.

@cojennin
Copy link
Contributor

cojennin commented Mar 7, 2013

Ok, so you can actually set the timepicker plugin by default to not include a time if one is not explicitly selected. The only problem is once the editorial metadata gets saved, displaying it with date( 'M d Y H:i') will show 00:00. So I'm trying to figure out how to best handle backwards compatibility.

Some options I was thinking of: The "date" type for editorial metadata could be split out into date and datetime, though that might cause some headaches in trying to determine whether to apply datepicker or timepicker to the corresponding input field. Another option is if the time is 00:00, just show the date without the time. A third option I can think of is leaving it as is, with the time showing 00:00 if a time is not selected. But I could see where that might get confusing, though to be fair that's how post times are configured for posts.

Do you have something in mind for how backwards compat could be accomplished with the addition of the timepicker?

@danielbachhuber
Copy link
Contributor Author

Another option is if the time is 00:00, just show the date without the time.

This seems to be the most reasonable approach to me.

@danielbachhuber
Copy link
Contributor Author

Mostly done. We should make sure the Story Budget, Calendar, and Manage Posts properly reflect the time value if there is one.

@ghost ghost assigned cojennin Mar 17, 2013
danielbachhuber added a commit that referenced this issue Mar 18, 2013
… method.

For the date field type, add support for minutes if they're specified.

See #157
danielbachhuber added a commit that referenced this issue Mar 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants