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.util.jquery.js
infragistics.ui.widget.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 the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. The enableUTCDates option can be used to output an UTC ISO string instead.
    For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as:
    "2016-11-11T10:00:00+05:00".

    Members

    • date
    • Type:string
    • The value method returns a Date object. When this mode is set the value sent to the server on submit is serialized as ISO 8061 string with local time and zone values by default.
    • displayModeText
    • Type:string
    • The "text" in display mode (no focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object).
    • editModeText
    • Type:string
    • The "text" in edit mode (focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object).

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					dataMode: "editModeText"
    				});
    				//Get
    				var dataMode = $(".selector").igDateEditor("option", "dataMode");
    			 
  • 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);
    			 
  • displayTimeOffset

    Type:
    object
    Default:
    null

    Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one.
    Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent.
    Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					displayTimeOffset: 180
    				});
    
    				//Get
    				var displayTimeOffset = $(".selector").igDateEditor("option", "displayTimeOffset");
    			 
  • enableUTCDates

    Type:
    bool
    Default:
    false

    Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values.
    The option is only applied in "date" dataMode.

    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");
    			 
  • language
    Inherited

    Type:
    string
    Default:
    "en"

    Set/Get the locale language setting for the widget.

    Code Sample

     
    					//Initialize
    				$(".selector").igDateEditor({
    					language: "ja"
    				});
    
    				// Get
    				var language = $(".selector").igDateEditor("option", "language");
    
    				// Set
    				$(".selector").igDateEditor("option", "language", "ja");
    			 
  • 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

    Set/Get the locale setting for the widget.

    Code Sample

     
    					//Initialize
    				$(".selector").igDateEditor({
    					locale: {}
    				});
    
    				// Get
    				var locale = $(".selector").igDateEditor("option", "locale");
    
    				// Set
    				$(".selector").igDateEditor("option", "locale", {});
    			 
  • 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 dateInputFormat 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 dateInputFormat 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:
    enumeration
    Default:
    en-US

    Set/Get the regional setting for the widget.

    Code Sample

     
    				//Initialize
    				$(".selector").igDateEditor({
    					regional: "ja"
    				});
    				// Get
    				var regional = $(".selector").igDateEditor("option", "regional");
    				// Set
    				$(".selector").igDateEditor("option", "regional", "ja");
    			 
  • 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:
    enumeration
    Default:
    1

    Gets/Sets delta-value which is used to increment or decrement the editor date on spin actions. When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period.
    When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value.
    Accepted values for deltas are positive integer numbers, and the fractional portion of floating point numbers is ignored.
    spinDelta: {
    year: 4,
    month: 3,
    day: 10,
    hours: 12,
    minutes: 15,
    seconds: 10,
    milliseconds: 100
    }
    Time periods that don't have values use 1 as default.

    Members

    • number
    • Type:number
    • Value this value it is applied to all time periods - years, days, minutes, etc.
    • object
    • Type:object
    • A configuration object, which defines specific values for each time period. The option can accept the following format:.

    Code Sample

     
    				//Initialize with number
    				$(".selector").igDateEditor({
    					spinDelta: 10
    				});
    				//Initialize with object
    				$(".selector").igDateEditor({
    					spinDelta: {
    						year: 4,
    						month: 3,
    						day: 10,
    						hours: 12,
    						minutes: 15,
    						seconds: 10,
    						milliseconds: 100
    					}
    				});
    				//Get
    				var spinDelta= $(".selector").igDateEditor("option", "spinDelta");
    				//Set with number
    				$(".selector").igDateEditor("option", "spinDelta", 10);
    				//Set with object
    				$(".selector").igDateEditor("option", "spinDelta", { minutes: 15 });
    			 
  • 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 dateInputFormat 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 value entered from the user after internal formatting.
    Use ui.originalValue to obtain the value entered from the user before internal formatting.
    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) {
    						...
    					}
    				});
    				 
  • changeGlobalLanguage
    Inherited

    .igDateEditor( "changeGlobalLanguage" );

    Changes the widget language to global language. Global language is the value in $.ig.util.language.

    Code Sample

     
    				$(".selector").igDateEditor("changeGlobalLanguage");
    			 
  • changeGlobalRegional
    Inherited

    .igDateEditor( "changeGlobalRegional" );

    Changes the widget regional settins to global regional settings. Global regional settings are container in $.ig.util.regional.

    Code Sample

     
    				$(".selector").igDateEditor("changeGlobalRegional");
    			 
  • changeLocale
    Inherited

    .igDateEditor( "changeLocale" );

    Changes the all locales into the widget element to the language specified in options.language
    Note that this method is for rare scenarios, see language or locale option setter.

    Code Sample

     
    				$(".selector").igDateEditor("changeLocale");
    			 
  • changeRegional

    .igDateEditor( "changeRegional" );

    Changes the the regional settings of widget element to the language specified in options.regional
    Note that this method is for rare scenarios, use regional option setter.

    Code Sample

     
    				$(".selector").igDateEditor("changeRegional");
    			 
  • 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 as a date object. This method can be used when dataMode is set as either displayModeText or editModeText.
    In such cases the value() method will not return date object and getSelectedDate() can be used to replace that functionality.

    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 inside key event handlers, like keydown or keyup. This method can be used only when the editor is focused. If you invoke this method in display mode, when the editor input is blurred, 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. This method can be used when dataMode is set as either displayModeText or editModeText.
    In such cases the value() cannot accept a date object as a new value and getSelectedDate() can be used to replace that functionality.

    • 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 dateInputFormat 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.