Hi,
I Need a field on my webclient, so the user can choose a time (without the date).
Is there a solution for this in Servoy, as I can only find the Calendar option?
Thanks.
Hi,
I Need a field on my webclient, so the user can choose a time (without the date).
Is there a solution for this in Servoy, as I can only find the Calendar option?
Thanks.
just thought of this the other day:
create an emtpy valuelist: ‘dateTimeOfDay’
then trigger this code during startup:
var $step = _to_app_user$current_user.time_interval; //get the time interval from the usersettings
if(!$step) $step = 30;
var $counter = 1440/$step;
var $date = new Date();
$date.setHours(00,00);
var $value = $date.valueOf();
var $vlDate;
var $display = new Array();
var $values = new Array();
for (var i = 1; i <= $counter; i++)
{
$vlDate = new Date($value);
$display[$display.length] = utils.dateFormat($vlDate,'HH:mm');
$values[$values.length] = $vlDate;
$value += ($step * 60000);
}
application.setValueListItems('dateTimeOfDay', $display, $values);
Works fine for us, hope it will help you!