Datepicker custom selection Javascript / jQuery - javascript

I need to make the datepicker like this:
just a brief intro, my project is to make something like employee holiday request.
so that the employee can apply their day-off request, but here's what my boss ask for the requirement. Sunday, and world official holiday need to be automatically added when the user picked the previous date or after.
Ex : 25 December is Christmas day.
Then I (as the employee) lets say pick 24th Dec and 26th Dec as my day-off. Then I may not skipped 25th December, it needs to be calculated as well.
That means I already used my 3 days off chance(my office only allow 12 days day-off in a year).
Sorry for the long explanation, I'm a newbie. I just want to know is this possible and if so, how? can you at least show me the trick. THANK YOU SO SO MUCH

Related

Custom Date and Time Input with date of "Today" adding one day for a Restaurant

I am currently a student and I would like to get some help for a website I am creating.This is what I would like to make it look like.
So what I am trying would be this, today is the 30th Oct. 18, adding 1 Day, like shown on the form and having the current time, which is not the hard part, I am just unsure about the date and I can't find the right solution on the internet.
If anybody could help, that would be great.
Thank you before hand.

How to display exact current year in yii2

In yii2, how can we display exact current year even if the user has changed the system year.
For eg. if year is 2017 and if we change the year from system to 2018, then how should we display correct year i.e, 2017
If the user cannot choose the year there's simply no point in asking him. If you think that current year is an important piece of info for the user just display a static label generated from server—in PHP that'd be echo date('Y');.
If you feel that having current year changed and not getting it updated real-time in your HTML while the user is filling the survey is not acceptable, you might want to consider making your survey shorter.

Opening hours / fullcalendar for an "anonymous" week

I'd like to use full calendar to let users create opening hours for weekdays (Monday to Sunday, and if possible holidays). What fullcalendar already does, but it's not for a particular week in time so it should not have dates. So, questions:
any ideas to not attach to a particular week? My best idea so far is to pick a particular week in time and hide dates.
any idea to show an 8th day for holidays?
i used the agendaweek view for the the week, and save the data without the date
start hour
end hour
weekday
then for every week i claculate the date and add to it the hour.
maybe fullcalendar is'nt the best thing for that.

How to visibly disable past timeslots for Day view jQuery fullcalendar

Is their a configurable way to visibly disable the past timeslots for the current day in the Day view of jQuery fullcalendar?
I'm displaying business hours 9:00 AM to 6:00 PM for the day. Consider the time now is 12:30 PM, I need to block users to book any events prior to 12:30 PM. Also the disabled timeslots has to be greyed out and unselectable. I can write the select callback validating the time selected. But need a visual effect to let the user feel that the past timeslots are not selectable.
Welcoming custom scripts too.
You could use eventAfterAllRender and append a css class to all slots which have passed.
It should be easy to work out how many rows you need to apply the class to (time of day in minutes / 30). Add the disabled css class to the td's and style with whatever you feel like.
This obviously won't actually disable the slots though and you will need to use the dayClick callback to disable past times

JQuery calender to highlight current week and block 3 weeks

I'm using jquery calender in one of my application and what I need to do is once I select a date between day Mon - Fri then entire Mon-Fri days should get highlight and also 3 weeks considering only from Mon - Fri gets greyed out.
I tired to get some good input from already posted query but none was helpfull. I took help from post Jquery calender 2 way block date but was difficult to implement.
I need a some code snippet to understand how to validate over calender days.
Thanks

Categories