The datetime-local input requires a specific format for the value strings. In the OP, they're missing the time.
I struggle with this myself because Ruby also adds the timezone by default. You need to format time objects correctly with something like:
Time.now.strftime("%Y-%m-%dT%H:%M")