Welcome Guest, Not a member yet? Register   Sign In
Data type edit input
#1

Hi, having to edit an article already present, I come across the field composed of an input data.

PHP Code:
<div class="form-group mb-3 row">
   <label class="form-label col-3 col-form-label">Birth Date</label>
        <div class="col">
            <input type="date" name="birth" class="form-control" value="<?= esc($item->birth); ?>">
            <?= $validation->showError('birth'?>
        </div>
</div> 


Taking the current value (therefore a date and a date type field) unfortunately I do not take the date that I saved in the database in "strtotime" format.

PHP Code:
'birth' => strtotime(str_replace('/','-',$this->request->getVar('birth'))), 


How can I do?
Reply


Messages In This Thread
Data type edit input - by Marcolino92 - 04-30-2020, 12:32 AM
RE: Data type edit input - by php_rocs - 04-30-2020, 05:16 PM
RE: Data type edit input - by Marcolino92 - 05-01-2020, 12:17 AM
RE: Data type edit input - by php_rocs - 05-01-2020, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB