I have a requirement to change the namespaces from ui: to lightning: as ui namespaces are going to get depricated in May'21. While doing so, I'm getting the error from the following tag

<aura:dependency resource="markup://ui:inputDate" />

To change the namepsace from ui:inputDate to lightning:input for date, I need to provide type = "date". But in the above tag, I'm getting error while doing so. Below is the line

<aura:dependency resource="markup://lightning:input" type="date" />

Below is the error i'm getting

Failed to save CustomLightningComponent.cmp: Invalid type: date: Source

Also, I'm having this namespace in helper.js as well.

return this.createComponent('ui:inputDate', opts);

Can anyone please suggest on how to update ui:inputdate to lightning:input with type as date in the above component and helper.js


1 Answer 1


The type attribute is the type of resource that the component depends on. The default value is COMPONENT.

The most commonly used values are:

  2. EVENT

Use a comma-separated list for multiple types; for example: COMPONENT, APPLICATION.

The type, date you need to pass into the attributes of the component which is opt in your case.

$A.createComponent(String type, Object attributes, function callback)

aura:dependency | Dynamically Creating Components

  • 1
    that means, if i just provide lightning:input instead of ui:inputdate is sufficient without type = "date" tag? I'm having a doubt that how the component understands the tag as date tag without type?
    – SK_112
    Commented Aug 10, 2020 at 8:17
  • yes in dependency you don't need to provide the type of input. You mention that in the call to createComponent(second link from the answer.) Commented Aug 10, 2020 at 8:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .