Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [lightninginput]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
2answers
35 views

LWC: Wait until property propagates down containment hierarchy

I'm working on a Lightning Web Component form where child components contain input fields. These components can be expanded to see all the fields, or collapsed to save space. So far, so good. The ...
0
votes
1answer
30 views

Unable to set Text Alignment for lightning-input (Number) LWC component

I am using lightning-input of type number (LWC) and trying to have input text center aligned. At the end, element's class is being set to "slds-input", So I cannot use custom class to add css. I am ...
0
votes
1answer
62 views

Required attribute not working lightning:input rerender

I am facing an issue with below code. Required attribute on lightning:input is not working on rerender. I have an inputCheckbox and I render the lightning:input field upon checkbox selection. This is ...
0
votes
1answer
112 views

Lightning-input label font size too small on mobile

I create a visual force page with a lightning web component form. The problem I have is that the input labels are too small on a mobile. The visual force page: <apex:page showHeader="false" ...
3
votes
1answer
64 views

Modify LWC component styles

I came across a requirement where I wanted to change the width of the Date & Time pickers of the <lightning-input></lightning-input> LWC component from component library. It took ...
0
votes
3answers
95 views

Lightning: Stop page refreshing WHEN Enter key is pressed

I am using the ui:inputtext for lightning component. When the user hit enters the page refreshes. Is there anyway to stop it from doing that. Cmp <aura:component controller="MovieController"> ...
0
votes
1answer
76 views

lightning:input type=“file” not working

I'm working with a lightning custom component that needs to load files and handle them in back controller. I have this definition of lightning:input: <lightning:input type="file" label="{!$Label....
3
votes
3answers
108 views

How to implement Auto-date functionality in the Lightning JS

I would like to show the auto date format like mm/dd/yy...with auto add /. I would like to implement exact same functionality shown in the below example from Fiddle. Here is the example: Fiddle.
1
vote
1answer
123 views

Placing asterisk to to Lightning:input fields in LWC

I am trying to add a double asterisk to lightning:input tags in LWC, by using "required" tag inside the tag i am able to see the asterisk, but two issues with this is i have to show double asterisk to ...
1
vote
1answer
208 views

Lightning-input - Date/Time - Min and Max [closed]

In this: <lightning-input type="datetime" name="EventStartDateTime"> How do I set the min and max values for time ( 06:00 to 11 pm ) and Date (Min: Today and Max: Today +10 years) ?
0
votes
1answer
373 views

Required Validation upon submitting a LWC form

The issue with above approach is that the form is not getting submitted. As we have not defined any type for lightning-button. Yet, it is displaying error messages correctly but I am stuck on how to ...
0
votes
1answer
99 views

Add custom validation when table is loaded in LWC

I have a table with few columns. I have to add validation based on first two columns. First column is "Model Number" and second is "Part Number". I am using html table with "for:each". And data is ...
0
votes
1answer
31 views

validation after data is imported through .csv in lighnting web componet form

I made a UI, where i am taking inputs inside loop. I have four columns. First column is Model number and second column is Part Number(read only). When they enter model number i am calling class and ...
0
votes
1answer
41 views

Bind inputs to array of objects in js file

I am new to LWC. I ma made a UI, where i am taking inputs in array of objects. But i am not able to map those values in the JS file. I know how to do for single input, but not sure how to do for list ...
0
votes
1answer
102 views

lightning-input validation inside loop

I am new to lightning web component. I was trying to create a table where i take input of new records. I am putting one field for now, for simplicity. <template for:each={allrecords} for:item='...
0
votes
1answer
31 views

Lightning:input required always true

I have a lightning component like the below, <aura:component description="GDPR_Settings_Configuration" implements="force:appHostable"> <aura:attribute name="gdprSetting" type="Object" ...
1
vote
1answer
20 views

How to change output type to input type in lightning onclick

I like to change output field type to input type when i click on date picker of date field.
0
votes
2answers
100 views

lightning-input-address embedded in VF page. Address lookup not working

I have a use case to embed a lightning web component in a VF Page (in Classic) which includes a lightning-input-address component. The component includes the standard address lookup input (which ...
1
vote
1answer
64 views

Are pre built lightning web components (example lightning-input) available for use in open source?

I just tried using LWC on my local, but not able to use <lightning-input />. Is it available for open source? Is there any way to bring prebuilt lightning web components with lightning namespace ...
2
votes
0answers
98 views

Spell check doesn't work well in lightning input rich text

I'm having a lightning out app in which I'm having a custom rich text field. When I try to correct the spelling for the misspelled words, it's stripping out the entire line instead of correcting the ...
0
votes
1answer
199 views

Display spinner on lightning:input type=“search” field

At the moment I have spinner next to my search field, but it's wonky. What is preferred way to display spinners for search fields? Current solutions is... Essentially I want something similar that'...
0
votes
0answers
92 views

File upload thumbnail preview in Lightning

I would like to understand if there is any way to do thumbnail preview in salesforce on file upload I tried implementating the below but apparently it does not work without paura package/framework ...
0
votes
0answers
151 views

Display currency in lightning

I am using lightning:input to display a currency value <lightning:input aura:id="fee" type="number" formatter="currency" label="Fee" name="fee" value="{!v.feeObj.Fee__c}" step="0....
4
votes
1answer
481 views

Lightning:input in Aura:iteration values aren't set

I am trying to create an array of String values in an lightning component using a List attribute: <aura:attribute name="keywords" type="List" default="['','','']" /> With multiple inputs: <...
0
votes
0answers
1k views

onBlur for lightning:input

Trying to implement logic for lightning:input on onBlur case. I need to close this input, when it lose focus, and if I click related buttons for this lightning:input(Confirm/Cancel), want to have some ...
0
votes
1answer
173 views

Action failed: c:DateValidation$controller$doAction [inputCmp.showHelpMessageIfInvalid is not a function]

I trying to validate ui:inputDate along with lightning:input of type Date. But I'm getting the error as Action failed: c:DateValidation$controller$doAction [inputCmp.showHelpMessageIfInvalid is ...
0
votes
1answer
920 views

how to format date in lightning components [duplicate]

I'm using lightning input of type date in my lighting component. Once the date is selected it is showing date as **Feb 12, 2019 ** But we want the date to be shown as MM/DD/YY. is it possible Here is ...
0
votes
0answers
41 views

Lightning:input type= date changing year from dropdown doesn't work

In Lightning,for Date input field I use <lightning:input type="date" aura:id="Start_date__c" value="{!v.Start_Date__c}" /> In UI, in the datepicker,if I try to change the year using the ...
1
vote
1answer
142 views

How to upload files to a related record using lightning components?

I'm trying to upload a file to a related record using just the <lightning:input> component. The <aura: component> includes the force:hasRecordId and by using {!v.recordId} I am able to ...
2
votes
1answer
250 views

How can you get the caret position when working from an event?

Looking at the Locker documentation they list selectionStart as being a valid attribute, but I can't find a way to access it. I am trying to write an input masking utility, and everything works fine ...
0
votes
0answers
40 views

lightning:input press enter and hide mobile keyboard

I have a <lightning:input which is used to search for products. CMP <lightning:input onchange="{!c.handleSearchTermChange}" aura:id="searchTerm" label="Search Products" type="search" /> ...
3
votes
1answer
2k views

How can I use Lightning:input focus on init?

Not sure what am i missing here but trying few approaches but still having some issues and it doesn't work so far. How can I invoke the method focus on a ui input : cmp <lightning:input label="...
0
votes
1answer
364 views

Lightning Pill as Output Text

I have a component having multiple values.The multiple values are coming properly in the input text box. I want to show the values selected from the list as lightning pills. My Component Code is :- &...
2
votes
0answers
623 views

Lightning:input[type=number] value attribute is string instead of number

I encountered a fascinating bug (or feature) in the lightning:input[type=number] component and I was wondering if any of you have had this problem before? I'll describe what happens: My lightning ...
2
votes
1answer
168 views

Error in Lightning Design System Input element on Mobile

I am using lightning:input out of the box component. I'm displaying an error message on the field using the standard functionality of the component. The error message is little long for Mobile but ...
1
vote
0answers
356 views

Issue with Lightning:input and currency formatter

I'm creating a lightning component with a lightning:input, but I have an issue with decimal places and currency formatter. This is my code: <lightning:input name="foo" value="foo" type="number" ...
1
vote
1answer
2k views

lightning:input vertical alignment in table cell

Hi, I want to create a table in my lightning component. I created 2 lightning:input fields and want to change the vertical alignment to "middle" but it does not work. I tried to do the following: &...
7
votes
1answer
498 views

How to handle percentage factor of 100 problems when using lightning:input and lightning:datatable?

When working on a bug, I just noticed that lighting:input now supports two percentage formatters, where the older one percent expects the user to know to enter e.g. 0.5 for 50%: <lightning:input ...
14
votes
1answer
375 views

Cannot read property '$$OwnerKey$$' of null

I have a Visualforce Lightning Out page that's rendering some <lightning:input type="date"> elements. Since the Winter '19 release in the dev sandbox I'm working in, whenever I select a date ...
3
votes
2answers
2k views

How to add lightning:input to lightning:recordEditForm

I'm building out a question answer component where certain answers will have specific input types and it would be nice to set some key parameters of the input field yet still use the lightning:...
4
votes
2answers
789 views

Lightning Input datetime prevent value issue

I am using a lightning:input to get a date/time value in the users Locale. If the user picks a date that is beyond today I need to prevent that value from being entered. I am able to catch this ...
0
votes
1answer
245 views

Lightning input showing valueMissing error with non-null value in Edge browser

On a button press, I am attempting to validate my Lightning input fields before taking an action. For fields marked as required, I am validating that the input field has a value with something like: ...
4
votes
1answer
1k views

How to set currency code to <lightning:input type=“number” formatter=“currency”>

I am developing a custom currency field with lightning:input type="number" formatter="currency" component: <lightning:input type="number" formatter="currency" value="100" step="1"/> I have ...
0
votes
0answers
188 views

lightning input file values are changed on attribute modification

I have file input and radio: <lightning:input aura:id="file-input" label="Attachment" type="file" accept="....
0
votes
0answers
122 views

lightning input file not working in modal

I have this code: <lightning:input name="myFile" type="file" label="Attachment" required="true" onchange="{! c.handleFilesChange }"/> It works fine when placed in component. But when it is ...
0
votes
1answer
696 views

Custom validity does not work when component is recovered in array

I am trying to create a dynamic form validation using the lightning:input component. According to the documentation of this component (https://developer.salesforce.com/docs/component-library/bundle/...
0
votes
1answer
929 views

Setting multiple selections on a dynamic created <ui:inputselect>

I'm sure I'm missing something obvious here but I'm trying to set all dynamically created iputselectoptions as selected when my lightning component is initialised but I'm finding that nothing is set ...
6
votes
3answers
13k views

Lightning:input type=“date”: how to change the date fomat - Summer'18

I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format. <lightning:input type="date" name="input8" label="Dates" value="...
6
votes
2answers
843 views

Did they break lightning:input with Summer'18?

I'm aware that it's still beta, but I didn't expect them to break it for older api versions :/ <aura:application extends="force:slds"> <aura:attribute name="myNumber" type="Decimal" ...
1
vote
2answers
2k views

<lightning:input variant=“label-hidden”> input does not take whole parent width

when I use : <aura:application extends="force:slds" > <div> <lightning:input type="text" label="myLabel" name="withLabel" value="withLabel" /> </div> </aura:...