While trying to pass initial_date attribute to DatePickerElement constructor, it raises
slack.errors.SlackObjectFormationError: initial_date attribute must be in format ‘YYYY-MM-DD’
even though you pass there correct date format, like "2020-03-08".
This happens because initial_date_valid for DatePickerElement uses incorrect regex for verifying date - r"\d{4}-[01][12]-[0123]\d".
This regex only matches 01, 02, 11 and 12 months.
x in one of the [ ])x in each of the [ ])slackclient version: 2.2.0
python version: 3.7.0
OS version(s): MacOS Catalina Version 10.15.3
DatePickerElement with action_id, placeholder and initial_date attributes (month in initial_date should be from 03 to 10);to_dict() method.Expected result is a dict object with action_id, initial_date, type and placeholder attributes.
SlackObjectFormationError is being raised.

Thank you very much for taking the time to report this. I've confirmed the bug and am working on the fix. I will come up with a PR for fixing this and will release a new version soon.
👋 slackclient 2.6.0rc1 is out. The pre-release version contains fixes for your issue described here.
https://pypi.org/project/slackclient/2.6.0rc1/
One week later from now, we'll be releasing version 2.6.0 to PyPI.
If you have a chance, could you try the release candidate version out and let us know your feedback? Thank you very much for being patient with this issue.
Most helpful comment
Thank you very much for taking the time to report this. I've confirmed the bug and am working on the fix. I will come up with a PR for fixing this and will release a new version soon.