My plugin's custom fields don't show values when entry saved as draft
When you save a draft, all of the fields’ POST data is saved in the craft_entrydrafts table, exactly as it showed up in POST. When the draft is loaded, it’s that raw POST data that is passed to your field type’s getInputHtml() method - not whatever the field type would have returned in prepValueFromPost().

So your getInputHtml() method just needs to be aware that there’s a chance that the $value passed to it may be raw POST data, and react accordingly in that case.

If your field type is storing dates and you’re using Craft’s built-in date/time templates (_includes/forms/date.html and _includes/forms/time.html, which are rendered by that dateTimeField() macro in _includes/forms.html), then the POST data will look like this, for whatever input name you passed in.



array(
    'date' =&gt; '[localized date string]',
    'time' =&gt; '[localized time string]'
)


That looks like it would be tricky to deal with. Thankfully, Craft’s DateTime class has a handy-yet-awkwardly-named createFromString() static method which will check to see if a passed-in value follows that array format, and normalize it into an actual DateTime object for you, taking the localized date/time formats and timezones into account for you.

So all you need to do, from your get field type’s getInputHtml() and prepValueFromPost() methods, is check to see if $value['startDate'] and $value['endDate'] are arrays, and if so, run them through DateTime::createFromString().

We happen to have an existing field type that does the same thing: Store Hours. Rather than dealing with just two dates per field, it's actually dealing with with 14 (an Open and Close time for each day of the week), but it should be easy enough to adapt its code for your needs. Here’s its field type file: https://github.com/pixelandtonic/StoreHours/blob/master/storehours/fieldtypes/StoreHoursFieldType.php