cancel
Showing results for 
Search instead for 
Did you mean: 

Can't enter dates for date attributes in admin panel

Can't enter dates for date attributes in admin panel

I'm trying to enter dates for Set Product as New From Date in the admin panel. First problem is that the date picker doesn't work. Clicking on it does nothing. Second problem; I enter a date for the attribute and on save I get;

 

Warning: strtotime() expects parameter 1 to be string, object given in /var/www/html/magento/vendor/magento/framework/Stdlib/DateTime/DateTime.php on line 138

 

I've tried numerous formats for dates, but nothing works. Is there a fix for this?

3 REPLIES 3

Re: Can't enter dates for date attributes in admin panel

"First problem is that the date picker doesn't work. Clicking on it does nothing."
How to see the diagnostic reports in the Google Chrome browser console? https://mage2.pro/t/278

Re: Can't enter dates for date attributes in admin panel

I've just logged into the admin panel again this morning and now it's working. Pretty flakey.

Re: Can't enter dates for date attributes in admin panel

I have found this error when adding special prices

 

Error was

 

Warning: strtotime() expects parameter 1 to be string, object given in <project_path>\vendor\magento\framework\Stdlib\DateTime\DateTime.php on line 138

 

----Update-----

I have found reported issue - https://github.com/magento/magento2/issues/5984