mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Add datepicker component (#716)
This commit is contained in:
parent
8285bf02fe
commit
68890f8083
6 changed files with 39 additions and 0 deletions
|
|
@ -290,6 +290,7 @@ class AbstractApp extends AbstractBoot
|
|||
ko.components.register('Select', require('Component/Select'));
|
||||
ko.components.register('Radio', require('Component/Radio'));
|
||||
ko.components.register('TextArea', require('Component/TextArea'));
|
||||
ko.components.register('Date', require('Component/Date'));
|
||||
|
||||
ko.components.register('x-script', require('Component/Script'));
|
||||
// ko.components.register('svg-icon', require('Component/SvgIcon'));
|
||||
|
|
|
|||
7
dev/Component/Date.jsx
Normal file
7
dev/Component/Date.jsx
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
import {componentExportHelper} from 'Component/Abstract';
|
||||
import {AbstractInput} from 'Component/AbstractInput';
|
||||
|
||||
class DateComponent extends AbstractInput {}
|
||||
|
||||
module.exports = componentExportHelper(DateComponent, 'DateComponent');
|
||||
15
dev/External/ko.js
vendored
15
dev/External/ko.js
vendored
|
|
@ -9,6 +9,7 @@
|
|||
$ = require('$'),
|
||||
JSON = require('JSON'),
|
||||
Opentip = require('Opentip'),
|
||||
Pikaday = require('pikaday'),
|
||||
|
||||
fDisposalTooltipHelper = function (oElement) {
|
||||
ko.utils.domNodeDisposal.addDisposeCallback(oElement, function () {
|
||||
|
|
@ -124,6 +125,20 @@
|
|||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.pikaday = {
|
||||
'init': function (oElement, fValueAccessor, fAllBindingsAccessor, oViewModel) {
|
||||
|
||||
ko.bindingHandlers.textInput.init.apply(oViewModel, Array.prototype.slice.call(arguments));
|
||||
|
||||
if (Pikaday)
|
||||
{
|
||||
oElement.__pikaday = new Pikaday({
|
||||
field: oElement
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ko.bindingHandlers.tooltip = {
|
||||
'init': function (oElement, fValueAccessor) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue