How to insert default hour with javascript?

QuestionsHow to insert default hour with javascript?
C3media asked 8 years ago

Hello, this is my code to insert default hour to my form:

$col = array();
$col["title"] = "Hora de salida";
$col["name"] = "note";
$col["width"] = "10";
$col["editable"] = true; // this column is editable
$col["editoptions"] = array("size"=>10, "defaultValue"=> date("H:i:s",$m=strtotime('+3 minutes'))); // with default display of textbox with size 20
$col["editrules"] = array("required"=>true); // and is required
$col["search"] = false;
$cols[] = $col;

Works fine…

But it´s not taking realtime hour, it´s possible make with JavaScript o insert method?

Thank you

1 Answers
Abu Ghufran answered 8 years ago

This will set server time.
If you want to set client time, you can set using JS code in afterShowForm event.
Refer demos/editing/dialog-layout.php

Your Answer

14 + 0 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?