I have looked at this in the past and it’s not as easy as it sounds. In fact you’ll notice there isn’t a plugin in the entire WordPress directory that does this.
I agree it would be a nice feature to have though so I might bit the bullet at some point.
Ok, I looked a bit more at this and think I have a way to do it but it won’t be part of this plugin, I’ll be creating a new plugin for it.
Thread Starter
FilipW
(@filwi91)
Cool!
I’m not much of a programmer, but wouldn’t it be possible to simply use a setting to set the value once the user clicks on (i.e. opens up) the calendar? The calendar already has the ability to set the time once the user sets the date. The calendar plugin could read a value form its settings and set what’s shown the same way as if the user would set it.
That way you wouldn’t need to do anything with the internal workings of WP, since it’s still the user who decides and confirms the change at the same time that they set the date.
Hm… I realize that I’m not much of an explainer. Let me know if this sounds completely off the wall.
The problem is knowing if the time/date have already been set or not. Otherwise everytime I open the calendar it’s going to reset the time/date.
Anyway, I’ve got a new plugin working, Default Post Date and Time, which does the trick.