Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

343
Views
On change event hide the textbox of selected row

I have a table with a date column & action column. When I click on the row button, a text box is visible. On textbox change, I want to hide the text box & show the changed data <span class="actual-date-label"><?=$item['actual_date']?></span>

This is the code so far I have tried. But I am unable to hide textbox and show label on change event.

<tr data-id="<?=$item['product_id']?>">
    <td scope="col"><?=$item['planned_date']?></td>
    <td scope="col">
        <span class="actual-date-label"><?=$item['actual_date']?></span>
        <input
           type="text"
           size="8"
           class="form-control edit-datepicker"
           value="<?=$item['actual_date']?>"
           onchange="myFunction(this.value, <?=$item['p_id']?>)"
        >
    </td>
    <td scope="col" id="btn-edit"><input type="button" value="Edit"></td>
</tr>


    $(document).on('click', '#btn-edit', function(event) {
        event.preventDefault();
        $(this).closest("tr").find(".edit-datepicker").show();
        $(this).closest("tr").find(".actual-date-label").hide();
    })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!