Skip to main content
deleted 146 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Well, finally i fixed it. Yes, Clive was absolutely right  : The default value MUST be set using the date format "Y- default value MUST be set ONLY this way #default_value' =>m-d", such as with date('Y-m-d', $date) not depending #date_format value for date_popup field. Difference wasdate('Y-m-d', $date).

The difference is that I used 'Y"Y-M-d'(same as in #date_format)d" instead of 'Y"Y-m-d'd" for setting #default_value. Thanks everyone. Hope this helps someone.

Well, finally i fixed it. Yes, Clive was absolutely right  - default value MUST be set ONLY this way #default_value' => date('Y-m-d', $date) not depending #date_format value for date_popup field. Difference was that I used 'Y-M-d'(same as in #date_format) instead of 'Y-m-d' for setting #default_value. Thanks everyone. Hope this helps someone.

Clive was absolutely right: The default value MUST be set using the date format "Y-m-d", such as with date('Y-m-d', $date).

The difference is that I used "Y-M-d" instead of "Y-m-d" for #default_value.

Source Link
swindler
  • 141
  • 1
  • 10

Well, finally i fixed it. Yes, Clive was absolutely right - default value MUST be set ONLY this way #default_value' => date('Y-m-d', $date) not depending #date_format value for date_popup field. Difference was that I used 'Y-M-d'(same as in #date_format) instead of 'Y-m-d' for setting #default_value. Thanks everyone. Hope this helps someone.