As title implies;
Is it possible to use the (awesome) date(time) picker from the back-end, at the front-end?
Short answer: no.
Bummer. Will search for something else instead. And the not-so-short answer?
You can try to figure out what JS and CSS is used to create a datepicker like the one in October's backend. But it will definetly be easier to just use an existing one for the project. If your theme uses bootstrap, you could consider using this one: https://bootstrap-datepicker.readthedocs.org/en/latest/ (But there are tons of other options)
What a coincidence! Was just implementing that one. Thanks for the help by the way!
Awesooomeeeee. Thanks a bunch!
Edit: What's the Time picker called by the way? That's the one that's supersweet :O
Just for reference, if you wish to use a datepicker widget in the backend in a partial for example you can use this.
use Backend\FormWidgets\DatePicker; use Backend\Classes\FormField; // $this = Backend\Classes\Controller which is needed in widgetbase $datepicker = new DatePicker($this, new FormField('fromDate', 'whateverreally')); // $fromDate is a Carbon object $datepicker->data['fromDate'] = $fromDate; $datepicker->mode = 'date'; echo $datepicker->render();
Should be relatively easy to modify for frontend.
1-8 of 8