Load Datatime field

Asked

Viewed 40 times

0

I’m trying to carry a field data from the database, I tried to set the value in atributo value but I have not succeeded in what is the best practice for this ?

<input value="<?php echo @$linha[DAT_EHORA_EVENT];?>" id="DAT_EHORA_EVENT" name="DAT_EHORA_EVENT" type="datetime-local" placeholder="" class="input-large">
  • http://www.w3schools.com/jsref/prop_datetime-local_defaultvalue.asp

  • here are all attributes for this type of input http://www.w3schools.com/jsref/dom_obj_datetime-local.asp

  • Can’t find anything that clears my doubt.

  • Does it come blank? or does not come formatted date?

  • It comes in white. @rray

1 answer

0


you are forgetting to wrap the name of the field with QUOTES (in your case, single quotes)

<input value="<?php echo @$linha['DAT_EHORA_EVENT'];?>" id="DAT_EHORA_EVENT" name="DAT_EHORA_EVENT" type="datetime-local" placeholder="" class="input-large">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.