Time clock and Date as Toolbar options

Use this forum to suggest and vote on new features.

Moderators: Lynn, nwolf, jkruper, SAldinger, bbosley, awarnick

Time clock and Date as Toolbar options

1)Yes, I really need this feature.
0
No votes
2)Yes, I would use this feature, but it is not urgent.
0
No votes
3)Maybe, a nice option that I might use.
0
No votes
4)Maybe, but it can definitely wait until others are ready.
0
No votes
5)No, I don't think I would use this feature.
0
No votes
 
Total votes : 0

Time clock and Date as Toolbar options

Postby hakim » Mon Apr 11, 2016 11:17 am

We use Kioware as a published app with Citrix to kiosks. One feature that would be very useful is to add a clock and the date as a toolbar options. Allowing the users to know the current time and date would be very beneficial in our implementation.
hakim
 
Posts: 2
Joined: Mon Apr 11, 2016 11:12 am

Re: Time clock and Date as Toolbar options

Postby awarnick » Mon Apr 11, 2016 2:40 pm

I sent you a beta build of KioWare that will enable you to display the current date/time on the toolbar.

Here are the directions:
1. Open the KioWare Config Tool, click the upper-left menu button, and select View User Data Directory.
2. Open CustomToolbarCode.js with Notepad.
3. Remove the line JUST BEFORE "var _sessId". The line is: /*.
4. Remove the last line of the file, which is: */.
5. Save the file.
6. Open the KioWare Config Tool to the User Interface tab and edit the Main Toolbar.
7. Click Add Control -> Text.
8. Set the text to: [DateTime].
9. Run KioWare, and that text will be replaced with the current date/time.

Tip: In the Config Tool, set Message Detail Level to All Messages on the Developer tab so that you can immediately see any logs that happen from the code. You may also want to uncheck Hide Message Details...
Andrew Warnick
KioWare Support
+1 717 843-4790 x490
877 843-4790 x490 (Toll Free USA)
User avatar
awarnick
Support Team Member
 
Posts: 965
Joined: Mon Jul 23, 2007 2:26 pm

Re: Time clock and Date as Toolbar options

Postby hakim » Mon Apr 11, 2016 5:40 pm

That is working. Is there any way to change the format of the date and also change the time to 12-Hr time instead of 24-Hr?
hakim
 
Posts: 2
Joined: Mon Apr 11, 2016 11:12 am

Re: Time clock and Date as Toolbar options

Postby awarnick » Tue Apr 12, 2016 9:21 am

You can format the date any way you want. I'm simply calling my _DateToStr function which is this:
Code: Select all
function _DateToStr(dt, dateTimeSep)
{
   var d= Pad0(dt.getFullYear().toString(), 4)+"-"+Pad0((dt.getMonth()+1).toString(), 2)+"-"+Pad0(dt.getDate().toString(), 2);
   var h= Pad0(dt.getHours().toString(), 2);
   var m= Pad0(dt.getMinutes().toString(), 2);
   var s= Pad0(dt.getSeconds().toString(), 2);

   return d+dateTimeSep+h+":"+m+":"+s;
}
The Pad0 function pads the number with 0's in front if needed.

You can use the JavaScript date reference to add/remove/rearrange parts of the date:
http://www.w3schools.com/jsref/jsref_obj_date.asp

Doing a quick search, I found a function to return a 12hr time from a date:
Code: Select all
function Get12HrTime(date)
{
  var hours = date.getHours();
  var minutes = date.getMinutes();
  var ampm = hours >= 12 ? 'pm' : 'am';
  hours = hours % 12;
  hours = hours ? hours : 12; // the hour '0' should be '12'
  minutes = minutes < 10 ? '0'+minutes : minutes;
  var strTime = hours + ':' + minutes + ' ' + ampm;
  return strTime;
}
http://stackoverflow.com/questions/8888491/how-do-you-display-javascript-datetime-in-12-hour-am-pm-format

Hopefully you are able to figure all of that out. Let me know if you run into issues, or are confused.
Andrew Warnick
KioWare Support
+1 717 843-4790 x490
877 843-4790 x490 (Toll Free USA)
User avatar
awarnick
Support Team Member
 
Posts: 965
Joined: Mon Jul 23, 2007 2:26 pm


Return to New Features

Who is online

Users browsing this forum: No registered users and 1 guest

cron