add time stuff
[roojs1] / ux / DateDisplay.js
1
2
3  
4            
5 Roo.form.DateDisplay = function(config){
6     
7     
8     Roo.form.DateDisplay.superclass.constructor.call(this, config);
9     this.picker = new Roo.DatePicker({
10         
11         
12     });
13     
14 };
15
16 Roo.extend(Roo.form.DateDisplay , Roo.form.DateField ,  {
17     
18     inputType  : 'hidden',
19     
20     onRender : function(ct, position)
21     {
22         Roo.form.TextField.superclass.onRender.call(this, ct, position);
23         
24         
25         this.el.dom.value = this.value ? this.formatDate(this.value, 'Y-m-d') : '';
26         // prevent input submission
27         
28         // now render the field..  
29         this.wrap = this.el.wrap();
30         
31         this.viewEl = this.wrap.createChild({ tag: 'div', cls: 'x-form-displayfield'});
32         
33         this.picker.onRender(this.viewEl, position);
34         
35     }
36      
37     
38 });