/**
* @event show
* Fires when this field show.
- * @param {Roo.bootstrap.DateField} this
+ * @param {Roo.bootstrap.DateField} thisthis
* @param {Mixed} date The date value
*/
show : true,
* valid according to {@link Date#parseDate} (defaults to 'H:i').
*/
format : "H:i",
-
+
+ getAutoCreate : function()
+ {
+ this.after = '<i class="fa far fa-clock"></i>';
+ Roo.bootstrap.TimeField.superclass.getAutoCreate.call(this);
+
+
+ },
onRender: function(ct, position)
{
this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
this.pop = this.picker().select('>.datepicker-time',true).first();
- this.pop.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block'
+ this.pop.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
this.picker().on('mousedown', this.onMousedown, this);
this.picker().on('click', this.onClick, this);
fireKey: function(e){
if (!this.picker().isVisible()){
- if (e.keyCode == 27) // allow escape to hide and re-show picker
+ if (e.keyCode == 27) { // allow escape to hide and re-show picker
this.show();
+ }
return;
}
var cls = ['bottom'];
- Roo.log('run!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1');
- Roo.log(Roo.lib.Dom.getViewWidth());
- Roo.log(Roo.get(document.body).getScroll());
- Roo.log(this.inputEl().getLeft());
- Roo.log(this.picker().getWidth());
- Roo.log(this.el);
- Roo.log(this.el.getLeft());
- Roo.log(this.inputEl());
- Roo.log(this.inputEl().getLeft());
if((Roo.lib.Dom.getViewHeight() + Roo.get(document.body).getScroll().top) - (this.inputEl().getBottom() + this.picker().getHeight()) < 0){ // top
cls.pop();
cls.push('top');
cls.push('left');
}
- this.picker().addClass('top');
+ this.picker().addClass(cls.join('-'));
var _this = this;
}
});
-// this.picker().setTop(0 - this.picker().getHeight()).setLeft(this.inputEl().getLeft() - this.el.getLeft());
-// this.picker().setTop(this.inputEl().getHeight()).setLeft(this.inputEl().getLeft() - this.el.getLeft());
},
onFocus : function()