ui.igDateEditor

ui.igDateEditor_image

The igDateEditor control includes a host of configuration options to help you format and constrain the date data coming from input forms. Further information regarding the classes, options, events, methods and themes of this API are available under the associated tabs above.

The following code snippet demonstrates how to initialize the igDateEditor control.

Click here for more information on how to get started using this API. For details on how to reference the required scripts and themes for the igDateEditor control read, Using JavaScript Resources in Ignite UI and Styling and Theming Ignite UI.

Code Sample

 
      <!doctype html>
      <html>
      <head>
          <title>Ignite UI igDateEditor</title>
          <!-- Infragistics Combined CSS -->
          <link href="css/themes/infragistics/infragistics.theme.css" rel="stylesheet" type="text/css" />
          <link href="css/structure/infragistics.css" rel="stylesheet" type="text/css" />
          <!-- jQuery Core -->
          <script src="js/jquery.js" type="text/javascript"></script>
          <!-- jQuery UI -->
          <script src="js/jquery-ui.js" type="text/javascript"></script>
          <!-- Infragistics Combined Scripts -->
          <script src="js/infragistics.core.js" type="text/javascript"></script>
          <script src="js/infragistics.lob.js" type="text/javascript"></script>
          <script type="text/javascript">
              $(function () {
                  $("#dateEditor").igDateEditor({
                      width: 280,
                      dateInputFormat: "dateTime",
                      regional: "en-US"
                  });
              });
          </script>
      </head>
      <body>
          <input id="dateEditor" value="8/26/2015 12:00" />
      </body>
      </html>
    

Related Samples

Related Topics

Dependencies

jquery-1.9.1.js
jquery.ui-1.9.0.js
infragistics.util.js
infragistics.ui.scroll.js
infragistics.ui.validator.js

Inherits

  • allowNullValue
    Inherited

    Type:
    bool
    Default:
    false

    Gets/Sets whether the editor value can become null.
    If that option is false, and editor has no value, then value is set to an empty string.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					allowNullValue : false
    				});
    
    				//Get
    				var allowNullValue = $(".selector").igDateEditor("option", "allowNullValue");
    
    				//Set
    				$(".selector").igDateEditor("option", "allowNullValue", false);
    				 
  • buttonType

    Type:
    enumeration
    Default:
    none

    Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too.

    Members

    • clear
    • Type:string
    • A button to clear the value is located on the right side of the editor.
    • spin
    • Type:string
    • Spin buttons are located on the right side of the editor.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						buttonType : "clear"
    					});
    					//Get
    					var buttonType = $(".selector").igDateEditor("option", "buttonType");
    				 
  • centuryThreshold

    Type:
    number
    Default:
    29

    Gets/Sets year for auto detection of 20th and 21st centuries.
    That option is used to automatically fill century when the user entered only 1 or 2 digits into the year field or when the date pattern contains only 1 or 2 year positions, e.g. "yy" or "y".
    If user entered value larger than value of this option, then 20th century is used, otherwise the 21st.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						centuryThreshold: 35
    					});
    
    					//Get
    					var centuryThreshold = $(".selector").igDateEditor("option", "centuryThreshold");
    
    					//Set
    					$(".selector").igDateEditor("option", "centuryThreshold", 35);
    				 
  • dataMode

    Type:
    enumeration
    Default:
    date

    Gets/Sets the value type returned by the get of value() method. That also affects functionality of the set value(val) method and the copy/paste operations of browser. Note: That is used as default.

    Members

    • date
    • Type:string
    • The Date object is used. When that mode is set the value send to the server on submit is string value converter from the javascript Date object using "toISOString" method.
    • displayModeText
    • Type:string
    • The String object is used and the "text" in display mode (no focus) format (pattern).
    • editModeText
    • Type:string
    • The String object is used and the "text" in edit mode (focus) format (pattern).

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					dataMode: "editModeText"
    				});
    				//Get
    				var dataMode = $(".selector").igDateEditor("option", "dataMode");
    				//Set
    				$(".selector").igDateEditor("option", "dataMode", "displayModeText");
    			 
  • dateDisplayFormat

    Type:
    string
    Default:
    null

    Gets/Sets format of date while editor has no focus.
    Value of that option can be set to a specific date pattern or to a flag defined by regional settings.
    If value is not set, then the dateInputFormat is used automatically.
    If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them.
    List of predefined regional flags:
    "date": the datePattern member of regional option is used
    "dateLong": the dateLongPattern member of regional option is used
    "time": the timePattern member of regional option is used
    "timeLong": the timeLongPattern member of regional option is used
    "dateTime": the dateTimePattern member of regional option is used
    List of explicit characters, which should have escape \\ character in front of them:
    C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f.
    List of date-flags when explicit date pattern is used:
    "y": year field without century and without leading zero
    "yy": year field without century and with leading zero
    "yyyy": year field with leading zeros
    "M": month field as digit without leading zero
    "MM": month field as digit with leading zero
    "MMM": month field as short month name
    "MMMM": month field as long month name
    "d": day of month field without leading zero
    "dd": day of month field with leading zero
    "ddd": day of the week as short name
    "dddd": day of the week as long name
    "t": first character of string which represents AM/PM field
    "tt": 2 characters of string which represents AM/PM field
    "h": hours field in 12-hours format without leading zero
    "hh": hours field in 12-hours format with leading zero
    "H": hours field in 24-hours format without leading zero
    "HH": hours field in 24-hours format with leading zero
    "m": minutes field without leading zero
    "mm": minutes field with leading zero
    "s": seconds field without leading zero
    "ss": seconds field with leading zero
    "f": milliseconds field in hundreds
    "ff": milliseconds field in tenths
    "fff": milliseconds field.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						dateDisplayFormat: "dateLong"
    					});
    
    					//Get
    					var dateDisplayFormat = $(".selector").igDateEditor("option", "dateDisplayFormat");
    
    					//Set
    					$(".selector").igDateEditor("option", "dateDisplayFormat", "dateLong");
    				 
  • dateInputFormat

    Type:
    string
    Default:
    null

    Gets format of date while editor has focus.
    Value of that option can be set to explicit date pattern or to a flag defined by regional settings.
    If value is set to explicit date pattern and pattern besides date-flags has explicit characters which match with date-flags or mask-flags, then the "escape" character should be used in front of them.
    If option is not set, then the "date" is used automatically.
    List of predefined regional flags:
    "date": the datePattern member of regional option is used
    "dateLong": the dateLongPattern member of regional option is used
    "time": the timePattern member of regional option is used
    "timeLong": the timeLongPattern member of regional option is used
    "dateTime": the dateTimePattern member of regional option is used
    List of explicit characters, which should have escape \\ character in front of them: C, &, a, A, ?, L, 9, 0, #, >, <, y, M, d, h, H, m, s, t, f.
    List of date-flags when explicit date pattern is used:
    "yy": year field without century and with leading zero
    "yyyy": year field with leading zeros
    "MM": month field as digit with leading zero
    "dd": day of month field with leading zero
    "t": first character of string which represents AM/PM field
    "tt": 2 characters of string which represents AM/PM field
    "hh": hours field in 12-hours format with leading zero
    "HH": hours field in 24-hours format with leading zero
    "mm": minutes field with leading zero
    "ss": seconds field with leading zero
    "f": milliseconds field in hundreds
    "ff": milliseconds field in tenths
    "fff": milliseconds field
    Note! This option can not be set runtime.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						dateInputFormat : "dateLong"
    					});
    
    					//Get
    					var dateInputFormat = $(".selector").igDateEditor("option", "dateInputFormat");
    				 
  • disabled
    Inherited

    Type:
    bool
    Default:
    false

    Gets/Sets the disabled attribute for the input. If set to true the input is disabled, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is not submitted.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					disabled : false
    				});
    
    				//Get
    				var disabled = $(".selector").igDateEditor("option", "disabled");
    
    				//Set
    				$(".selector").igDateEditor("option", "disabled", true);
    			 
  • enableUTCDates

    Type:
    bool
    Default:
    false

    Gets/Sets formatting of the dates as UTC.
    That option is supported only when dataMode option is 'date' and Date objects are used to get/set value of editor.
    Notes:
    That option affects only functionality of get/set value method and the Date-value, which was set on initialization.
    When application uses the set-value, then internal Date-value and displayed-text is incremented by TimezoneOffset.
    When application uses the get-value, then editor returns internal Date-value decremented by TimezoneOffset.
    When that option is modified after initialization, then displayed text and internal Date-value are not affected.
    It is not recommended to change that option without resetting Date-value.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						enableUTCDates : true
    					});
    
    					//Get
    					var enableUTCDates = $(".selector").igDateEditor("option", "enableUTCDates");
    
    					//Set
    					$(".selector").igDateEditor("option", "enableUTCDates", true);
    				 
  • excludeKeys
    Inherited

    Type:
    string
    Default:
    null

    Gets ability to prevent entering specific characters from keyboard or on paste.
    Notes:
    If a character is specified in "includeKeys" option also, then "excludeKeys" has priority.
    Note! This option can not be se runtime.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					excludeKeys: "ABC"
    				});
    
    				//Get
    				var excludedKeys= $(".selector").igDateEditor("option", "excludeKeys");
    				 
  • height
    Inherited

    Type:
    enumeration
    Default:
    null

    Gets/Sets the height of the control.

    Members

    • null
    • Type:object
    • will fit the editor inside its parent container, if no other heights are defined.
    • string
    • The height can be set in pixels (px) and percentage (%).
    • number
    • The height can be set as a number in pixels.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					height : 25
    				});
    				//Get
    				var height = $(".selector").igDateEditor("option", "height");
    				//Set
    				$(".selector").igDateEditor("option", "height", 25);
    				 
  • includeKeys
    Inherited

    Type:
    string
    Default:
    null

    Gets ability to enter only specific characters in input-field from keyboard and on paste.
    Notes:
    If "excludeKeys" option contains same characters as this option, then "excludeKeys" has priority.
    Note! This option can not be se runtime.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					includeKeys: "ABC"
    				});
    
    				//Get
    				var includedKeys= $(".selector").igDateEditor("option", "includeKeys");
    				 
  • inputName
    Inherited

    Type:
    string
    Default:
    null

    Gets/Sets the name attribute of the value input. This input is used to sent the value to the server. In case the target element is input and it has name attribute, but the developer has set the inputName option, so this option overwrites the value input and removes the attribute from the element.

    Code Sample

     
    			//Initialize
    				$(".selector").igDateEditor({
    				  inputName : "textField"
    				});
    
    				//Get
    				var inputName = $(".selector").igDateEditor("option", "inputName");
    
    			//Set
    			$(".selector").igDateEditor("option", "inputName", "textField");
    			 
  • limitSpinToCurrentField

    Type:
    bool
    Default:
    false

    Gets/Sets ability to modify only 1 date field on spin events.
    Value false enables changes of other date fields when incremented or decremented date-field reaches its limits.
    Value true modifies only value of one field.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						limitSpinToCurrentField : true
    					});
    
    					//Get
    					var limitSpinToCurrentField = $(".selector").igDateEditor("option", "limitSpinToCurrentField");
    
    					//Set
    					$(".selector").igDateEditor("option", "limitSpinToCurrentField", true);
    				 
  • locale
    Inherited

    Type:
    object
    Default:
    null

    Gets/Sets the strings used for the localization of the component. This includes button titles, error messages etc. Value of the object should contain pairs or key:value members. Note: any sub-option of locale can appear within the main option of igEditor. In this case those values within main options will have highest priority and override corresponding value in locale.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					locale: {
    							spinUpperTitle: 'SpinUp'
    					}
    				});
    
    				//Get
    				var locale = $(".selector").igDateEditor("option", "locale");
    
    				//Set
    				$(".selector").igDateEditor("option", "locale", {spinUpperTitle: 'SpinUp'});
    			 
  • maxValue

    Type:
    date
    Default:
    null

    Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too.
    Note! This option doesn't use the displayInputFormat to extract the date.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						maxValue: new Date(2020, 11, 21)
    					});
    
    					//Get
    					var maxValue = $(".selector").igDateEditor("option", "maxValue");
    
    					//Set
    					$(".selector").igDateEditor("option", "maxValue", new Date(2020, 11, 21));
    				 
  • minValue

    Type:
    date
    Default:
    null

    Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too.
    Note! This option doesn't use the displayInputFormat to extract the date.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						minValue: new Date(1980, 6, 1)
    					});
    
    					//Get
    					var minValue = $(".selector").igDateEditor("option", "minValue");
    
    					//Set
    					$(".selector").igDateEditor("option", "minValue", new Date(1980, 6, 1));
    				 
  • nullValue

    Type:
    enumeration
    Default:
    null

    Gets/Sets the representation of null value. In case of default the value for the input is set to null, which makes the input to hold an empty string.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					nullValue : new Date(2015, 09, 08)
    				});
    				//Get
    				var nullText = $(".selector").igDateEditor("option", "nullValue");
    				//Set
    				$(".selector").igDateEditor("option", "nullValue", new Date(2015, 09, 08));
    				 
  • placeHolder
    Inherited

    Type:
    string
    Default:
    null

    Gets/Sets the text which appears in the editor when it has no focus and the "value" is null or empty string.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					placeHolder : "Enter Value"
    				});
    
    				//Get
    				var placeHolder = $(".selector").igDateEditor("option", "placeHolder");
    
    				//Set
    				$(".selector").igDateEditor("option", "placeHolder", "Enter Value");
    			 
  • preventSubmitOnEnter
    Inherited

    Type:
    bool
    Default:
    false

    Gets/Sets if the editor should prevent form submition when enter key is pressed.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    						preventSubmitOnEnter: true
    				});
    
    				//Get
    				var preventSubmitOnEnter = $(".selector").igDateEditor("option", "preventSubmitOnEnter");
    
    				//Set
    				$(".selector").igDateEditor("option", "preventSubmitOnEnter", true);
    			 
  • readOnly
    Inherited

    Type:
    bool
    Default:
    false

    Gets/Sets the readonly attribute for the input. If set to true the input is readonly, and all buttons and interactions are disabled. On submitting the form the editor belongs to, the value is submitted.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					readOnly : true
    				});
    
    				//Get
    				var readOnly = $(".selector").igDateEditor("option", "readOnly");
    
    				//Set
    				$(".selector").igDateEditor("option", "readOnly", true);
    			 
  • regional
    Inherited

    Type:
    object
    Default:
    null

    Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					regional: "en-US"
    				});
    
    				//Get
    				var region = $(".selector").igDateEditor("option", "regional");
    				 
  • revertIfNotValid
    Inherited

    Type:
    bool
    Default:
    true

    Gets/Sets if the editor should revert it's value to the previously valid value in case the value on blur, or enter key is not valid. If the opiton is set to false, editor calls clear functionality.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					revertIfNotValid : false
    				});
    
    				//Get
    				var revertIfNotValid = $(".selector").igDateEditor("option", "revertIfNotValid");
    
    				//Set
    				$(".selector").igDateEditor("option", "revertIfNotValid", false);
    			 
  • selectionOnFocus
    Inherited

    Type:
    enumeration
    Default:
    selectAll

    Gets/Sets the action when the editor gets focused. The default value is selectAll.

    Members

    • selectAll
    • Type:string
    • Setting this option will select all the text into the editor when the edit mode gets enetered.
    • atStart
    • Type:string
    • Setting this option will move the cursor at the begining the text into the editor when the edit mode gets enetered.
    • atEnd
    • Type:string
    • Setting this option will move the cursor at the end the text into the editor when the edit mode gets enetered.
    • browserDefault
    • Type:string
    • Setting this option won't do any extra logic, but proceed with the browser default behavior.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						selectionOnFocus: "atStart"
    					});
    					//Get
    					var selectionOnFocus= $(".selector").igDateEditor("option", "selectionOnFocus");
    					//Set
    					$(".selector").igDateEditor("option", "selectionOnFocus", "selectAll");
    					 
  • spinDelta

    Type:
    number
    Default:
    1

    Gets/Sets delta-value which is used to increment or decrement value in editor on spin events. If value is set to negative value an exception is thrown. Non integer value is supported only for dataMode double and float.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					spinDelta: 10
    				});
    
    				//Get
    				var spinDelta= $(".selector").igDateEditor("option", "spinDelta");
    
    				//Set
    				$(".selector").igDateEditor("option", "spinDelta", 10);
    			 
  • suppressNotifications
    Inherited

    Type:
    bool
    Default:
    false

    Disables/Enables default notifications for basic validation scenarios built in the editors such as required list selection, value wrapping around or spin limits.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					suppressNotifications : true
    				});
    
    				//Get
    				var suppressNotifications = $(".selector").igDateEditor("option", "suppressNotifications");
    
    				//Set
    				$(".selector").igDateEditor("option", "suppressNotifications", true);
    			 
  • tabIndex
    Inherited

    Type:
    number
    Default:
    null

    Gets/Sets tabIndex attribute for the editor input.

    Code Sample

     
    			  //Initialize
    			  $('.selector').igDateEditor({
    				  tabIndex: 1
    			  });
    
    			  //Get
    			  var tabIndex = $(".selector").igDateEditor("option", "tabIndex");
    
    			  //Set
    			  $(".selector").igDateEditor("option", "tabIndex", 1);
    			   
  • textAlign
    Inherited

    Type:
    enumeration
    Default:
    left

    Gets/Sets the horizontal alignment of the text in the editor.

    Members

    • left
    • Type:string
    • The text into the input gets aligned to the left.
    • right
    • Type:string
    • The text into the input gets aligned to the right.
    • center
    • Type:string
    • The text into the input gets aligned to the center.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						textAlign : "center"
    					});
    					//Get
    					var align = $(".selector").igDateEditor("option", "textAlign");
    					//Set
    					$(".selector").igDateEditor("option", "textAlign", "center");
    					 
  • validatorOptions
    Inherited

    Type:
    object
    Default:
    null

    Gets/Sets options supported by the igValidator widget.
    Note: Validation rules of igValidator, such as min and max value/length are applied separately triggering errors,
    while the corresponding options of the editor prevent values violating the defined rules from being entered.

    Code Sample

     
    					//Initialize
    					$(".selector").igDateEditor({
    						validatorOptions : {
    						   successMessage: "Success",
    									 required: true,
    									 onchange: true,
    						   notificationOptions: { mode: "popover" }
    						}
    					});
    
    					//Get
    					var validateOptions = $(".selector").igDateEditor("option", "validatorOptions");
    
    					//Set
    					$(".selector").igDateEditor("option", "validatorOptions", {onblur: true, onchange: true});
    				 
  • value

    Type:
    date
    Default:
    null

    Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too.
    Note! This option doesn't use the displayInputFormat to extract the date.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					value : new Date (2015, 11, 11)
    				});
    
    				//Get
    				var value = $(".selector").igDateEditor("option", "value");
    
    				//Set
    				$(".selector").igDateEditor("option", "value", new Date (2015, 11, 11));
    				 
  • width
    Inherited

    Type:
    enumeration
    Default:
    null

    Gets/Sets the width of the control.

    Members

    • null
    • Type:object
    • will stretch to fit data, if no other widths are defined.
    • string
    • The widget width can be set in pixels (px) and percentage (%).
    • number
    • The widget width can be set as a number in pixels.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					width : 200
    				});
    				//Get
    				var width = $(".selector").igDateEditor("option", "width");
    				//Set
    				$(".selector").igDateEditor("option", "width", 200);
    				 
  • yearShift

    Type:
    number
    Default:
    0

    Gets/Set value used to increase/decrease year part of the date, in order to set difference between year in Gregorian calendar and displayed year.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					yearShift : 4500
    				});
    
    				//Get
    				var yearShift = $(".selector").igDateEditor("option", "yearShift");
    
    				//Set
    				$(".selector").igDateEditor("option", "yearShift", 4500);
    			 

For more information on how to interact with the Ignite UI controls' events, refer to
Using Events in Ignite UI.

Note: Calling API methods programmatically does not raise events related to their operation unless specifically stated otherwise by the corresponding API documentation; those events are only raised by their respective user interaction.

Show Details
  • blur
    Inherited

    Cancellable:
    false

    Event which is raised when input field of editor loses focus.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditorblur", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					blur: function (evt, ui) {
    						...
    					}
    				});
    				 
  • focus
    Inherited

    Cancellable:
    false

    Event which is raised when input field of editor gets focus.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditorfocus", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					focus: function (evt, ui) {
    						...
    					}
    				});
    				 
  • keydown
    Inherited

    Cancellable:
    true

    Event which is raised on keydown event.
    Return false in order to cancel key action.
    Function takes arguments evt and ui.
    Use evt.originalEvent to obtain reference to event of browser.
    Use ui.owner to obtain reference to igEditor.
    Use ui.key to obtain value of keyCode.

    Code Sample

     
    				$(".selector").on("igdateeditorkeydown", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					keydown: function (evt, ui) {
    						...
    					}
    				});
    				 
  • keypress
    Inherited

    Cancellable:
    true

    Event which is raised on keypress event.
    Return false in order to cancel key action.
    Function takes arguments evt and ui.
    Use evt.originalEvent to obtain reference to event of browser.
    Use ui.owner to obtain reference to igEditor.
    Use ui.key to obtain value of keyCode.

    Code Sample

     
    				$(".selector").on("igdateeditorkeypress", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					keypress: function (evt, ui) {
    						...
    					}
    				});
    				 
  • keyup
    Inherited

    Cancellable:
    false

    Event which is raised on keyup event.
    Function takes arguments evt and ui.
    Use evt.originalEvent to obtain reference to event of browser.
    Use ui.owner to obtain reference to igEditor.
    Use ui.key to obtain value of keyCode.

    Code Sample

     
    				$(".selector").on("igdateeditorkeyup", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					keyup: function (evt, ui) {
    						...
    					}
    				});
    				 
  • mousedown
    Inherited

    Cancellable:
    false

    Event which is raised on mousedown event.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditormousedown", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					mousedown: function (evt, ui) {
    						...
    					}
    				});
    				 
  • mousemove
    Inherited

    Cancellable:
    false

    Event which is raised on mousemove at any part of editor including drop-down list.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditormousemove", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					mousemove: function (evt, ui) {
    						...
    					}
    				});
    				 
  • mouseout
    Inherited

    Cancellable:
    false

    Event which is raised on mouseleave at any part of editor including drop-down list.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditormouseout", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					mouseout: function (evt, ui) {
    						...
    					}
    				});
    				 
  • mouseover
    Inherited

    Cancellable:
    false

    Event which is raised on mouseover at any part of editor including drop-down list.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditormouseover", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					mouseover: function (evt, ui) {
    						...
    					}
    				});
    				 
  • mouseup
    Inherited

    Cancellable:
    false

    Event which is raised on mouseup event.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.element to obtain a reference to the event target.
    Use ui.editorInput to get a reference to the editor field.

    Code Sample

     
    				$(".selector").on("igdateeditormouseup", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					mouseup: function (evt, ui) {
    						...
    					}
    				});
    				 
  • rendered
    Inherited

    Cancellable:
    false

    Event which is raised after rendering of the editor completes.
    Function takes arguments evt and ui.
    Use ui.owner to get a reference to the editor performing rendering.
    Use ui.element to get a reference to the editor element.

    Code Sample

     
    				$(".selector").on("igdateeditorrendered", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					rendered: function (evt, ui) {
    						...
    					}
    				});
    				 
  • rendering
    Inherited

    Cancellable:
    false

    Event which is raised before rendering of the editor completes.
    Function takes arguments evt and ui.
    Use ui.owner to get a reference to the editor performing rendering.
    Use ui.element to get a reference to the editor element.

    Code Sample

     
    				$(".selector").on("igdateeditorrendering", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					rendering: function (evt, ui) {
    						...
    					}
    				});
    				 
  • textChanged
    Inherited

    Cancellable:
    false

    Event which is raised after text in the editor was changed. It can be raised when keyUp event occurs,
    when the clear button is clicked or when an item from a list is selected.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.text to obtain new text
    Use ui.oldText to obtain the old text.

    Code Sample

     
    				$(".selector").on("igdateeditortextchanged", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					textChanged: function (evt, ui) {
    					...
    					}
    				});
    				 
  • valueChanged
    Inherited

    Cancellable:
    false

    Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.newValue to obtain the new value.
    Use ui.originalValue to obtain the original value.
    Use ui.editorInput to obtain reference to the editor input.

    Code Sample

     
    				$(".selector").on("igdateeditorvaluechanged", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					valueChanged: function (evt, ui) {
    						...
    					}
    				});
    				 
  • valueChanging
    Inherited

    Cancellable:
    true

    Event which is raised before the editor value is changed.
    Return false in order to cancel change.
    It can be raised after loosing focus or on spin events.
    Function takes arguments evt and ui.
    Use ui.owner to obtain reference to igEditor.
    Use ui.newValue to obtain the new value.
    Use ui.oldValue to obtain the old value.
    Use ui.editorInput to obtain reference to the editor input.

    Code Sample

     
    				$(".selector").on("igdateeditorvaluechanging", function (evt, ui) {
    					...
    				});
    
    				//Initialize
    				$(".selector").igDateEditor({
    					valueChanging: function (evt, ui) {
    						...
    					}
    				});
    				 
  • clearButton
    Inherited

    .igDateEditor( "clearButton" );
    Return Type:
    jquery
    Return Type Description:
    Returns a reference to the jquery object.

    Returns a reference to the clear button UI element of the editor.

    Code Sample

     
    			var button =  $(".selector").igDateEditor("clearButton");
    			 
  • destroy
    Inherited

    .igDateEditor( "destroy" );

    Destroys the widget.

    Code Sample

     
    					$(".selector").igDateEditor("destroy");
    				 
  • displayValue
    Inherited

    .igDateEditor( "displayValue" );
    Return Type:
    string
    Return Type Description:
    Visible text of the editor.

    Gets the visible text in the editor.

    Code Sample

      $(".selector").igDateEditor("displayValue");  
  • editorContainer
    Inherited

    .igDateEditor( "editorContainer" );
    Return Type:
    jquery
    Return Type Description:
    The container editor element.

    Gets a reference to the jQuery element that wraps the editor.

    Code Sample

     
    			$(".selector").igDateEditor("editorContainer");
    			 
  • field
    Inherited

    .igDateEditor( "field" );
    Return Type:
    jquery
    Return Type Description:
    The visual editor element.

    Gets the input element of the editor.

    Code Sample

     
    			$(".selector").igDateEditor("field");
    			 
  • getSelectedDate

    .igDateEditor( "getSelectedDate" );
    Return Type:
    date

    Gets selected date.

    Code Sample

     
    			$(".selector").igDateEditor("getSelectedDate");
    			 
  • getSelectedText
    Inherited

    .igDateEditor( "getSelectedText" );
    Return Type:
    string
    Return Type Description:
    Selected text in editor.

    Gets the selected text from the editor in edit mode. This can be done on key event like keydown or keyup. This method can be used only when the editor is focused. If you call this method in display mode (The editor input is blured) the returned value will be an empty string.

    Code Sample

     
    			var text =  (".selector").igDateEditor("getSelectedText");
    			 
  • getSelectionEnd
    Inherited

    .igDateEditor( "getSelectionEnd" );
    Return Type:
    number
    Return Type Description:
    End index of the selected text in the editor.

    Gets the end index of the selected text in the editor.

    Code Sample

     
    			var intex = $(".selector").igDateEditor("getSelectionEnd");
    			 
  • getSelectionStart
    Inherited

    .igDateEditor( "getSelectionStart" );
    Return Type:
    number
    Return Type Description:
    Start index of the selected text in the editor.

    Gets the start index of the selected text in the editor.

    Code Sample

     
    			var intex = $(".selector").igDateEditor("getSelectionStart");
    			 
  • hasFocus
    Inherited

    .igDateEditor( "hasFocus" );
    Return Type:
    bool
    Return Type Description:
    Returns if the editor is focused or not.

    Gets whether the editor has focus.

    Code Sample

     
    				$(".selector").igDateEditor("hasFocus");
    			 
  • hide
    Inherited

    .igDateEditor( "hide" );

    Hides the editor.

    Code Sample

     
    			$(".selector").igDateEditor("hide");
    			 
  • inputName
    Inherited

    .igDateEditor( "inputName", [newValue:string] );
    Return Type:
    string
    Return Type Description:
    Current input name.

    Gets/Sets name attribute applied to the editor element.

    • newValue
    • Type:string
    • Optional
    • The new input name.

    Code Sample

     
    				$(".selector").igDateEditor("inputName", "checkbox");
    				 
  • insert
    Inherited

    .igDateEditor( "insert", string:string );

    Inserts the text at the location of the caret or over the current selection. If the editor is focused the method will insert the text over the current selection. If the editor is not focused the method will set the text as value of the editor.
    Note: The method raises textChanged event.

    • string
    • Type:string
    • The string to be inserted.

    Code Sample

     
    				$('.selector').igDateEditor({
    					blur: function (evt, ui) {
    						// insert 0 as the user leaves the field
    						ui.owner.insert("0");
    					}
    				});
    				$(".selector").igDateEditor("insert", "20");
    				 
  • isValid

    .igDateEditor( "isValid" );
    Return Type:
    bool
    Return Type Description:
    Whether editor value is valid or not.

    Checks if the value in the editor is valid. Note: This function will not trigger automatic notifications.

    Code Sample

     
    				var isValid = $(".selector").igDateEditor("isValid");
    			 
  • select
    Inherited

    .igDateEditor( "select", start:number, end:number );

    Selects the text between start and end indices in the editor. If the parameters are equal, then the method sets location of caret. The method has effect only when the editor has focus.

    • start
    • Type:number
    • Start of the selection.
    • end
    • Type:number
    • End of the selection.

    Code Sample

     
    				$(".selector").igDateEditor("select", 2, 4);
    			 
  • selectDate

    .igDateEditor( "selectDate", date:date );

    Sets selected date.

    • date
    • Type:date
    • .

    Code Sample

     
    				$(".selector").igDateEditor("selectDate", new Date (2016, 2, 3));
    			 
  • setFocus
    Inherited

    .igDateEditor( "setFocus", [delay:number] );

    Sets focus to the editor after the specified delay.

    • delay
    • Type:number
    • Optional
    • The delay before focusing the editor.

    Code Sample

     
    				$(".selector").igDateEditor("setFocus", 200);
    				 
  • show
    Inherited

    .igDateEditor( "show" );

    Shows the editor.

    Code Sample

     
    			$(".selector").igDateEditor(("show");
    			 
  • spinDown

    .igDateEditor( "spinDown", [delta:number] );

    Decreases the date or time period, depending on the current cursor position.

    • delta
    • Type:number
    • Optional
    • The decrease delta.

    Code Sample

     
    				$(".selector").igDateEditor("spinDown", 3);
    			 
  • spinDownButton

    .igDateEditor( "spinDownButton" );
    Return Type:
    jquery
    Return Type Description:
    The jQuery object representing the spin down UI element of the editor.

    Returns a reference to the spin down UI element of the editor.

    Code Sample

     
    				$(".selector").igDateEditor("spinDownButton");
    			 
  • spinUp

    .igDateEditor( "spinUp", [delta:number] );

    Increases the date or time period, depending on the current cursor position.

    • delta
    • Type:number
    • Optional
    • The increase delta.

    Code Sample

     
    				$(".selector").igDateEditor("spinUp", 2);
    			 
  • spinUpButton

    .igDateEditor( "spinUpButton" );
    Return Type:
    jquery
    Return Type Description:
    The jQuery object representing the spin up UI element of the editor.

    Returns a reference to the spin up UI element of the editor.

    Code Sample

     
    			$(".selector").igDateEditor("spinUpButton");
    			 
  • validate
    Inherited

    .igDateEditor( "validate" );
    Return Type:
    bool
    Return Type Description:
    Whether editor value is valid or not.

    Triggers validation for the editor. If validatorOptions are set will also call validate on the igValidator.

    Code Sample

     
    				var valid = $(".selector").igDateEditor("validate");
    				 
  • validator
    Inherited

    .igDateEditor( "validator" );
    Return Type:
    object
    Return Type Description:
    Returns reference to igValidator or null.

    Gets a reference to igValidator used by the editor.

    Code Sample

     
    					var validator = $(".selector").igDateEditor("validator");
    				 
  • value

    .igDateEditor( "value", [newValue:date] );
    Return Type:
    date
    Return Type Description:
    Current editor value.

    Gets/Sets editor value.

    Note! This option doesn't use the displayInputFormat to extract the date.

    • newValue
    • Type:date
    • Optional
    • New editor value. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. For example Date(/"thicks"/).

    Code Sample

     
    				$(".selector").igDateEditor("value", new Date (2016, 2, 3);
    			 
  • ui-state-active

    Class applied to the top element when editor is active. Default value is 'ui-state-active'.
  • ui-igedit-button-common ui-unselectable

    Class applied commonly to all the button containers, Default value is 'ui-igedit-button-common ui-unselectable ui-igedit-button-ltr ui-state-default'.
  • ui-igedit-buttonhover ui-state-hover

    Classes applied to the SPAN element of button in mouse-over state. Default value is 'ui-igedit-buttonhover ui-state-hover'.
  • ui-igedit-buttonpressed ui-state-highlight

    Classes applied to the SPAN element of button in pressed state. Default value is 'ui-igedit-buttonpressed ui-state-highlight'.
  • ui-igedit-cleararea ui-state-default

    Class applied to the div holding the clear button. Default value is 'ui-igedit-cleararea ui-state-default'.
  • ui-igedit-buttonimage ui-icon-circle-close

    Class applied to the div holding the clear button image. Default value is 'ui-igedit-buttonimage ui-icon-circle-close ui-icon ui-igedit-buttondefault'.
  • ui-igedit ui-igedit-container ui-widget ui-corner-all ui-state-default

    Class applied to the top element when editor is rendered in container. Default value is 'ui-igedit ui-igedit-container ui-widget ui-corner-all ui-state-default'.
  • ui-state-disabled

    Classes applied to the editing element in disabled state. Default value is 'ui-igedit-disabled ui-state-disabled'.
  • ui-igedit-dropdown-button

    Class applied to the div holding the drop down button. Default value is 'ui-igedit-dropdown-button'.
  • ui-icon ui-icon-triangle-1-s ui-igedit-buttonimage

    Class applied to the div holding the drop down button image. Default value is 'ui-icon ui-icon-carat-1-s ui-igedit-buttonimage'.
  • ui-igedit-dropdown ui-widget

    Class applied to the container holding the listitems. Default value is 'ui-igedit-dropdown'.
  • ui-igedit-input

    Class applied to the main/top element. Default value is 'ui-igedit-input'.
  • ui-igeditor-input-container ui-corner-all

    Class applied to the div which wraps the editable input (in case of multiline textarea). Default value is "ui-igeditor-input-container ui-corner-all".
  • ui-state-focus

    Class applied to the top element when editor is on focus. Default value is 'ui-state-focus'.
  • ui-state-hover

    Class applied to the top element when editor is hovered. Default value is 'ui-state-hover'.
  • ui-igedit-listitem ui-state-default

    Class applied to the SPAN element which represents item in dropdown list. Default value is 'ui-igedit-listitem ui-state-default'.
  • ui-state-active ui-igedit-listitemactive

    Class applied to the Class applied to the SPAN element which represents active item in dropdown list. Default value is 'ui-igedit-listitemselected ui-state-highlight'.
  • ui-igedit-listitemhover ui-state-hover

    Class applied to the Class applied to the SPAN element which represents item in dropdown list with mouse-over state. Default value is 'ui-igedit-listitemhover ui-state-hover'.
  • ui-igedit-listitemselected ui-state-highlight

    Class applied to the Class applied to the SPAN element which represents selected item in dropdown list. Default value is 'ui-igedit-listitemselected ui-state-highlight'.
  • ui-igedit-placeholder

    Class applied to the visible input in case of plaseHolder option set. This class is related only to the placeHolder styling. Default value is 'ui-igedit-placeholder'.
  • ui-igedit-spinlowerimage ui-icon-carat-1-s ui-icon

    Class applied to the div holding the spin down button image. Default value is 'ui-igedit-spinlowerimage ui-icon-carat-1-s ui-icon ui-igedit-buttondefault ui-igedit-spinbutton ui-igedit-buttonimage'.
  • ui-igedit-spinupperimage ui-icon-carat-1-n ui-icon

    Class applied to the div holding the spin up button image. Default value is "ui-igedit-spinupperimage ui-icon-carat-1-n ui-icon ui-igedit-buttondefault ui-igedit-spinbutton ui-igedit-buttonimage'.
  • ui-igedit-textarea

    Class applied to the visible textarea element in case of textMode set to 'multiline'.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.