• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

40
Views
How to show input field in only Uppercase using Oracle Jet oj-input-text?

I want to show letters only in uppercase in input text field.

<oj-input-text style="text-transform: uppercase;" id="text-input" placeholder="Select new Item number"
                         value="{{newItemNumber}}"></oj-input-text>

I have tried adding css "text-transform: uppercase" property to the element but that did not work. I also wrapped the element in a span and added css property but of no use. I want the input field to convert and show all input letters to uppercase as the user types. Is there a way to do it in ojet?

about 1 month ago ·

Juan Pablo Isaza

1 answers
Answer question

0

Thank you for your response. I realized that we can access and edit the input tag inside oj-input-text and perform our operations accordingly. Following code fixed my problem:

<oj-input-text id="text-input" placeholder="Select new Item number"
                                      value="{{newItemNumber}}">
                           <input data-oj-internal="" type="text"
                                  class="oj-inputtext-input oj-text-field-input oj-component-initnode"
                                  placeholder="Select new Item number" id="text-input|input" oninput="let p = this.selectionStart; this.value = this.value.toUpperCase();this.setSelectionRange(p, p);">
                       </oj-input-text>

about 1 month ago · Juan Pablo Isaza Report
Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.