Color div with specific value from: value to: value - javascript

There is API that get time of work about employee day of work, start time and finish time.
in this figure I wanna to show color bar with start and finish time base on value using in my web page using HTML, Css and any another tool
for example if employee work on Sunday from 9AM to 4PM it's show as a figure
Need any way to make tis practice

Related

Run Function in Laravel after a certain time and show this time as a countdown

So I have a function and I want this function to run after(like 10 min) user selects it. While timer(10 min) is counting down to run this function, I want timer to be shown to user in a spesific view. I have all functions and views set up for this aim just I dont know how to put timer and show it to user.
https://www.w3schools.com/howto/howto_js_countdown.asp
I checked this but I cant properly put PHP values into Javascript so I cant make it. I also thought about cron jobs but I am not sure how I can do it there.
1) I want a function to run after a spesific time.
2) Additionally I would really like to show this time as a countdown to user.
If you want function that will run after certain time at serverside - check laravel.com/docs/5.5/scheduling. It's really easy to setup.
You can create Laravel's with your function that will repeat every ten minutes or whatever you want. That job would get date from database and check if function should be executed - if so, mark database record with date as executed and call your function.
For timer, in my opinion best approach is to make AJAX call to some API which would return your date for timer, then all need to be done is assign it to a javascript's variable.
Another way is to render view template also with date, make it invisible with CSS display: none and then retrieve it from DOM for your JS timer.
You would need make some changes to timer at w3schools. Add some conditionals to check how much time left, and if it's =< 10 minutes, append timer to the DOM.

Wordpress display/hide content based on date/time without refreshing page

I have searched high and low looking for a plugin or code to show or hide content on a WordPress page based on the date and time without refreshing the page. I can rig something and have the page refresh at a certain time, but the users watching the live stream would see an interruption. It is also hard to find something that works on a recurring basis.
The content also needs to be recurring, so I need something like this: Show text "A" from 11:00 until 13:00 every Sunday and text "B" at all other times. I know this is possible, but I cannot find the right combination of code to make it happen.

Good javaScript time picker which shows previous and next time option?

Hi I am looking for a JavaScript time picker which shows the previous and next option. The closest one I found is eonasdan's Boostrap 3 time picker! But the thing missing is the visible previous/next time option. I did a mock up picture and highlighted the fields that I need in orange based on eonasdan's solution but I have no clue how to make it. Is there any good time picker I can use to make it?
Try this. In this you are provided with Date, Time and Date and Time together.

Attempting to create a calender with a clock picker built into each day as an ng-click

I understand that this sounds a bit far fetched but i want to build a monthly calendar that when the day is clicked it is routed to another page that then prompts the user to put in a start and end time which the program then calculates the total amounts of hours and assigns it to the original calendar. I have found a few j query plugins however when combined or any of their code is manipulated they both seem to break. If you have any suggestions anything is welcomed. I can upload what i have for code so far but its not really flushed out or good at all.

Planning tool JQuery / MVC 4

The webapplication I would like to build gives the user the possibility to select a period on a calendar. On the selected days they can write the start and end hour. The total amount of hours gets calculated. On the image below you can see what I would like to accomplish. What is a good way to get started programming this? Is there a good tutorial to get me started?
Is there a JQuery widget that gives a good start?
On the left you got some Employees and for each of them the user can select the period and fill in the hours they have to work.
I hope u get the idea that i have in mind. Please feel free to ask me any specifications.
I'm using MVC 4 - razor pages for the webapp
Thanks in advance
I've made something very similar in a MVC2 app with jQuery to check schedules for formative actions.
I first place a temporary span for the action and load it into the calendar provided by jQuery's datepicker, later I overwrite it's onSelect event to affect and save my data.
So when I click on a day of the calendar (only days on the previously selected time span are clickable) I allow user to introduce data for the schedule on that day.
Data saving to server is managed through AJAX calls that saves during using interaction.

Categories