j-TimePicker
- Wsparcie - mody ciemne
Konfiguracja:
seconds {Boolean}opcjonalny, umożliwia sekundy (default:false)ampm {Boolean}opcjonalny, umożliwia format czasu 12 godzin (default:false)
Składnik musi być nazywany ręcznie lub działa z komponentem j-Input automatycznie.
- important dodać składnik pod elementem
<body>
Używanie
var opt = {};
// opt.offsetX {Number} : adds X offset (default: 0)
// opt.offsetY {Number} : adds Y offset (default: 0)
// opt.seconds {Boolean} : shows seconds (default: false)
// opt.ampm {Boolean} : shows 12 hours time format (default: false)
// opt.align {left|center|right} (default: left)
opt.value = new Date();
// or
// opt.value = 'path.to.date' (in this case you don't need to declare "opt.callback")
opt.element = YOUR_ELEMENT;
opt.callback = function(date) {
console.log(date);
};
// opt.close {Function} optional, this function can determine the closing of TimePicker
SETTER('timepicker/show', opt);Użyj go z <ui-component name="timepicker">Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu DEF.fallback (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.
<a href="#timepicker">SHOW TIMEPICKER <ui-bind path="form.date" config="html:value.format('HH\:mm\:ss')"></ui-bind></a>
<ui-component name="timepicker"></ui-component>
<script>
var form = {};
form.date = new Date();
$('a[href="#timepicker"]').on('click', function(e) {
var opt = {};
opt.element = this;
opt.value = 'form.date';
opt.seconds = true;
SETTER('timepicker/toggle', opt);
});
</script>