I know magento provides functionality like Single Time Picker:
How to do it? I found how to create date picker and date-time picker. But for my task, i should to create single time picker...
In your Xml File :-
<field name="time_field">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Time</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">date</item>
<item name="dataScope" xsi:type="string">time_field</item>
<item name="component" xsi:type="string">Your_Module/js/form/element/time</item>
</item>
</argument>
</field>
Create Custom Js For Time Picker :-
Your/Module/view/adminhtml/web/js/form/element/time.js
define([
'Magento_Ui/js/form/element/date'
], function(Date) {
'use strict';
return Date.extend({
defaults: {
options: {
showsDate: false,
showsTime: true,
timeOnly: true
},
elementTmpl: 'ui/form/element/date'
}
});
});