dojox/form/DateTextBox.js

  • Provides:

    • dojox.form.DateTextBox
  • Requires:

    • dojox.widget.Calendar in common
    • dojox.widget.CalendarViews in common
    • dijit.form._DateTimeTextBox in common in project dijit
  • dojox.form.DateTextBox

    • type
      Function
    • chains:
      • dijit.form._DateTimeTextBox: (prototype)
      • dijit.form._DateTimeTextBox: (call)
    • summary
      A validating, serializable, range-bound date text box with a popup calendar
  • dojox.form.DateTextBox.popupClass

    • type
      String
    • summary
      The popup widget to use. In this case, a calendar with Day, Month and Year views.
  • dojox.form.DateTextBox._selector

    • summary
  • dojox.form.DateTextBox.openDropDown

    • type
      Function
    • source: [view]
         this.inherited(arguments);
         dojo.style(this.dropDown.domNode.parentNode, "position", "absolute");
    • summary
  • dojox.form.DayTextBox

    • type
      Function
    • chains:
      • dojox.form.DateTextBox: (prototype)
      • dojox.form.DateTextBox: (call)
    • summary
      A validating, serializable, range-bound date text box with a popup calendar that contains just months.
  • dojox.form.DayTextBox.popupClass

    • type
      String
    • summary
      The popup widget to use. In this case, a calendar with just a Month view.
  • dojox.form.DayTextBox.parse

    • type
      Function
    • parameters:
      • displayVal: (typeof )
    • source: [view]
         return displayVal;
    • summary
  • dojox.form.DayTextBox.format

    • type
      Function
    • parameters:
      • value: (typeof )
    • source: [view]
         return value.getDate ? value.getDate() : value;
    • summary
  • dojox.form.DayTextBox.validator

    • type
      Function
    • parameters:
      • value: (typeof )
    • source: [view]
         var num = Number(value);
         var isInt = /(^-?\d\d*$)/.test(String(value));
         return value == "" || value == null || (isInt && num >= 1 && num <= 31);
    • summary
  • dojox.form.DayTextBox._setValueAttr

    • type
      Function
    • parameters:
      • value: (typeof )
      • priorityChange: (typeof )
      • formattedValue: (typeof )
    • source: [view]
         if(value){
          if(value.getDate){
           value = value.getDate();
          }
         }
         dijit.form.TextBox.prototype._setValueAttr.call(this, value, priorityChange, formattedValue);
    • chains:
      • dijit.form.TextBox.prototype._setValueAttr: (call)
    • summary
  • dojox.form.DayTextBox.openDropDown

    • type
      Function
    • source: [view]
         this.inherited(arguments);


         this.dropDown.onValueSelected = dojo.hitch(this, function(value){
          this.focus(); // focus the textbox before the popup closes to avoid reopening the popup
          setTimeout(dojo.hitch(this, "closeDropDown"), 1); // allow focus time to take


          dijit.form.TextBox.prototype._setValueAttr.call(this, String(value.getDate()), true, String(value.getDate()));
         });
    • chains:
      • dijit.form.TextBox.prototype._setValueAttr: (call)
    • summary
  • dojox.form.DayTextBox.dropDown.onValueSelected

    • summary
  • dojox.form.MonthTextBox

    • type
      Function
    • chains:
      • dojox.form.DateTextBox: (prototype)
      • dojox.form.DateTextBox: (call)
    • summary
      A validating, serializable, range-bound date text box with a popup calendar that contains only years
  • dojox.form.MonthTextBox.popupClass

    • type
      String
    • summary
      The popup widget to use. In this case, a calendar with just a Year view.
  • dojox.form.MonthTextBox.selector

    • summary
  • dojox.form.MonthTextBox.postMixInProperties

    • type
      Function
    • source: [view]
         this.inherited(arguments);
         this.constraints.datePattern = "MM";
    • summary
  • dojox.form.MonthTextBox.format

    • type
      Function
    • parameters:
      • value: (typeof )
    • source: [view]
         if(!value && value !== 0){
          return 1;
         }
         if(value.getMonth){
          return value.getMonth() + 1;
         }
         return Number(value) + 1;
    • summary
  • dojox.form.MonthTextBox.parse

    • type
      Function
    • parameters:
      • value: (typeof )
      • constraints: (typeof )
    • source: [view]
         return Number(value) - 1;
    • summary
  • dojox.form.MonthTextBox.serialize

    • type
      Function
    • parameters:
      • value: (typeof )
      • constraints: (typeof )
    • source: [view]
         return String(value);
    • summary
  • dojox.form.MonthTextBox.validator

    • type
      Function
    • parameters:
      • value: (typeof )
    • source: [view]
         var num = Number(value);
         var isInt = /(^-?\d\d*$)/.test(String(value));
         return value == "" || value == null || (isInt && num >= 1 && num <= 12);
    • summary
  • dojox.form.MonthTextBox._setValueAttr

    • type
      Function
    • parameters:
      • value: (typeof )
      • priorityChange: (typeof )
      • formattedValue: (typeof )
    • source: [view]
         if(value){
          if(value.getMonth){
           value = value.getMonth();
          }
         }
         dijit.form.TextBox.prototype._setValueAttr.call(this, value, priorityChange, formattedValue);
    • chains:
      • dijit.form.TextBox.prototype._setValueAttr: (call)
    • summary
  • dojox.form.MonthTextBox.openDropDown

    • type
      Function
    • source: [view]
         this.inherited(arguments);


         this.dropDown.onValueSelected = dojo.hitch(this, function(value){
          this.focus(); // focus the textbox before the popup closes to avoid reopening the popup
          setTimeout(dojo.hitch(this, "closeDropDown"), 1); // allow focus time to take
          dijit.form.TextBox.prototype._setValueAttr.call(this, value, true, value);
         });
    • chains:
      • dijit.form.TextBox.prototype._setValueAttr: (call)
    • summary
  • dojox.form.MonthTextBox.constraints.datePattern

    • summary
  • dojox.form.MonthTextBox.dropDown.onValueSelected

    • summary
  • dojox.form.YearTextBox

    • type
      Function
    • chains:
      • dojox.form.DateTextBox: (prototype)
      • dojox.form.DateTextBox: (call)
    • summary
      A validating, serializable, range-bound date text box with a popup calendar that contains only years
  • dojox.form.YearTextBox.popupClass

    • summary
  • dojox.form.YearTextBox.format

    • type
      Function
    • parameters:
      • value: (typeof )
    • source: [view]
         console.log('Year format ' + value);
         if (typeof value == "string"){
          return value;
         }
         else if (value.getFullYear){
          return value.getFullYear();
         }
         return value;
    • summary
  • dojox.form.YearTextBox.validator

    • type
      Function
    • parameters:
      • value: (typeof )
    • source: [view]
         return value == "" || value == null || /(^-?\d\d*$)/.test(String(value));
    • summary
  • dojox.form.YearTextBox._setValueAttr

    • type
      Function
    • parameters:
      • value: (typeof )
      • priorityChange: (typeof )
      • formattedValue: (typeof )
    • source: [view]
         if(value){
          if(value.getFullYear){
           value = value.getFullYear();
          }
         }
         dijit.form.TextBox.prototype._setValueAttr.call(this, value, priorityChange, formattedValue);
    • chains:
      • dijit.form.TextBox.prototype._setValueAttr: (call)
    • summary
  • dojox.form.YearTextBox.openDropDown

    • type
      Function
    • source: [view]
         this.inherited(arguments);
         console.log('yearly openDropDown and value = ' + this.get('value'));


         this.dropDown.onValueSelected = dojo.hitch(this, function(value){
          this.focus(); // focus the textbox before the popup closes to avoid reopening the popup
          setTimeout(dojo.hitch(this, "closeDropDown"), 1); // allow focus time to take
          dijit.form.TextBox.prototype._setValueAttr.call(this,value, true, value);
         });
    • chains:
      • dijit.form.TextBox.prototype._setValueAttr: (call)
    • summary
  • dojox.form.YearTextBox.parse

    • type
      Function
    • parameters:
      • value: (typeof String)
      • constraints: (typeof dojo.date.locale.__FormatOptions)
    • source: [view]
         return value || (this._isEmpty(value) ? null : undefined); // Date
    • returns
      Date
    • summary
  • dojox.form.YearTextBox.filter

    • type
      Function
    • parameters:
      • val: (typeof )
    • source: [view]
         if (val && val.getFullYear){
          return val.getFullYear().toString();
         }
         return this.inherited(arguments);
    • summary
  • dojox.form.YearTextBox.dropDown.onValueSelected

    • summary
  • dojox.form

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary