add editable option to bootstrap DateField
[roojs1] / roojs-bootstrap-debug.js
index 324da9a..0923032 100644 (file)
@@ -23187,6 +23187,11 @@ Roo.extend(Roo.bootstrap.form.DateField, Roo.bootstrap.form.Input,  {
     singleMode : false,
 
     hiddenField : false,
+
+    /**
+     * @cfg {Boolean} editable False to prevent the user from typing text directly into the field (defaults to true)
+     */
+    editable: true,
     
     UTCDate: function()
     {
@@ -23374,6 +23379,10 @@ Roo.extend(Roo.bootstrap.form.DateField, Roo.bootstrap.form.Input,  {
         );
         this.inputEl().dom.setAttribute('name', this.name + '____hidden___');
 
+        if(!this.editable) {
+            this.inputEl().dom.setAttribute('readOnly', true);
+        }
+
     },
     
     picker : function()