There is no documentation (or reference to other documentation) on implementing date & time selectors from the admin pattern library:
Hi!
This is implemented using the standard jQuery UI timepicker widget https://jqueryui.com/datepicker/ + addon https://github.com/magento/magento2/blob/develop/lib/web/jquery/jquery-ui-timepicker-addon.js
Thank you very much -- it might be worth noting that in the pattern library and linking to the api documentation http://api.jqueryui.com/datepicker/
I'm going to reopen this issue -- there appears to be some Magento2 magic going on behind the scenes, and it's very unclear what is going on with the datepicker, and how styles are pulled into the admin pages. I really think we need some clear documentation on this, along with how to implement all of the different date/datetime pickers.
"Thank you very much -- it might be worth noting that in the pattern library and linking to the api "
Yeah, definitely you are right. There are several teams working on docs, we'll contact the team which authored the Admin Pattern Library.
" I'm going to reopen this issue... I really think we need some clear documentation on this"
We'll create a ticket for adding detailed docs, but we'll need some time to write and publish them.
Do you mind if we close this issue, once the internal one is created?
Sure no prob
I've added links http://devdocs.magento.com/guides/v2.0/pattern-library/getting-user-input/date_time_selector/date_time_selector.html#implementation
Can we re-open this ticket? This is not complete. I still don't know how to implement a timepicker, as there is no documentation.
Can you explain what we need to complete the task?
We need code examples to show how to use the datepicker with an input field, for all variations (ex. Single Time Picker, Date Range Picker, Horizontal stacked, Vertical stacked... all of them, how to implement), for both Admin and Frontend implementations.
Agreed, we need to expand the docs, and include code snippets and real-life examples. We will prioritize this for immediately post-GA work. Thanks @markoshust, please keep the feedback coming; I hope you plan on watching the Keynote at MLAustralia next week! ;-)
Oh, forgot to mention, DevDocs welcomes contributions of topics (complete topics, paragraphs, code examples, edits, added sentences, anything we can get) from the community. We have a sign-up sheet (http://devdocs.magento.com/guides/v2.0/howdoi/howdoi_contribute.html) specifically for How To topics, but we would welcome any topics, and any edits, clean-up etc of existing topics. Just do a PR and help any way that you can. Community-driven docs. ;-)
Thanks also @daim2k5 for helping out with moderation, labels, etc. "Up for Grabs" is my favorite. ;-)
Internal issue magetwo-47806
Thank you for your submission.
We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.
Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).
We are closing this GitHub ticket and have moved your request to the new forum.
We can keep the internal DevDocs ticket, and try to push it through, possibly as part of the upcoming Frontend docs push. Your longstanding request is not lost, @markoshust ... just in a new home. ;-)
We also want to use Magento 2 default DateTime picker on the frontend in input field but can't implement without its sample code snippets .Please share the documentation for DateTime picker implementation so we can start using in our projects.
We've moved to an internal ticket (MAGETWO-58288) and are working this now. Thanks for your persistence/patience. ;-) @almarchenko
Hi @qwerty7869 , @markoshust
Do you need info about using datepicker via the Field UI component (date input in Admin forms are implemented like this) or simply using the widget?
In other words, was your request about improving the http://devdocs.magento.com/guides/v2.1/javascript-dev-guide/widgets/widget_calendar.html doc, or about the absence of the comprehensive doc about Field UI comp?
We will add the latter in any case, but I would like to know your opinion if the calendar widget doc is good enough.
Thank you.
@almarchenko there is information about the widget themselves, but not how to use them. how would we use them in a module?
@markoshust Thanks, I got it!
@almarchenko Why is the internal mage ticket marked as done?
I don't see any update in the developer docs regarding this.
I have this in my knockoutjs html template:
<input type="text"
id="gift-message-whole-delivery-date"
class="input-text"
data-bind="datepicker: getObservable('deliveryDate'),
value: getObservable('deliveryDate'),
datePickerOptions: {
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
maxDate: new Date(),
datePickerPlaceholder: 'yy-mm-dd'
}">
What should it be so that the user can pick a date AND time?
Hello,
when I found this description Date and Time Selector I though something like this would come next to every example <source_model>Magento\Config\Model\Config\Source\Date\Short</source_model>
Most helpful comment
@almarchenko Why is the internal mage ticket marked as done?
I don't see any update in the developer docs regarding this.
I have this in my knockoutjs html template:
What should it be so that the user can pick a date AND time?