gendelf / jquery.businesshours Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin allows you to easy show & manage business hours
Home Page: http://gendelf.github.io/jquery.businessHours/
License: Apache License 2.0
jQuery plugin allows you to easy show & manage business hours
Home Page: http://gendelf.github.io/jquery.businessHours/
License: Apache License 2.0
Hi @gEndelf
Great plugin, thank you.
So this is my time object
{"mon_1_open":"12:00","mon_1_close":"14:00","tue_1_open":"12:00","tue_1_close":"14:00","wed_1_open":"12:00","wed_1_close":"14:00","thu_1_open":"12:00","thu_1_close":"14:00","fri_1_open":"12:00","fri_1_close":"14:00","sat_1_open":"12:00","sat_1_close":"14:00","sun_1_open":"12:00","sun_1_close":"14:00","mon_2_open":"17:00","mon_2_close":"22:00","tue_2_open":"17:00","tue_2_close":"22:00","wed_2_open":"17:00","wed_2_close":"22:00","thu_2_open":"17:00","thu_2_close":"22:00","fri_2_open":"17:00","fri_2_close":"22:00","sat_2_open":"17:00","sat_2_close":"22:00","sun_2_open":"17:00","sun_2_close":"22:00"}
As you may see this is tricky to move around with this plugin. What do you think or propose I should do ?
Cheers.
how to get value on change event? i tried below code but not working
$(".businessHoursContainer").each(function () {
var viewId = $(this).data("view-id");
var selectedHoursInput = $("#selectedBusinessHours-" + viewId);
var businessHoursManager = $(this).businessHours({
operationTime: JSON.parse(aaa),
postInit: function () {
$('.operationTimeFrom, .operationTimeTill').timepicker({
'timeFormat': 'H:i',
'step': 15
});
},
dayTmpl: '<div class="dayContainer" style="width: 80px;">' +
'<div data-original-title="" class="colorBox"><input type="checkbox" class="invisible operationState"></div>' +
'<div class="weekday"></div>' +
'<div class="operationDayTimeContainer">' +
'<div class="operationTime input-group"><span class="input-group-prepend"><i class="input-group-text mdi mdi-weather-sunny"></i></span><input type="text" name="startTime" class="mini-time form-control operationTimeFrom" value=""></div>' +
'<div class="operationTime input-group"><span class="input-group-prepend"><i class="input-group-text mdi mdi-weather-night"></i></span><input type="text" name="endTime" class="mini-time form-control operationTimeTill" value=""></div>' +
'</div></div>',
viewId: viewId // pass the view ID to the businessHours plugin
});
businessHoursManager.element.on("changed.bs.businessHours", function (event, data) {
console.log('hi');
$("#selectedBusinessHours").val(JSON.stringify(businessHoursManager.serialize()));
});
});
I have noticed, that in business hours if there is one option for splitting the time then it will be useful for non continuous time entries, like stores' opening hours, doctor's clinic timing etc.
Demo site on github gendelf.github.io/jquery.businessHours redirects to HTTPS, but all assets in example are loaded using HTTP. This is causing my browser to block the assets.
One option is to change the assets to use HTTPS instead. I think the asset servers you are using support HTTPS.
Another option is to leave the protocol off entirely (but keep the //) (i.e. //cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js) and the browser will automatically select the appropriate protocol based on the one used by the current URL.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/themes/github.css': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/rainbow.min.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/generic.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/javascript.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/html.js': this content should also be loaded over HTTPS.
Uncaught ReferenceError: jQuery is not defined jquery.timepicker.min.js:1
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/themes/github.css': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/rainbow.min.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/generic.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/javascript.js': this content should also be loaded over HTTPS.
[blocked] The page at 'https://gendelf.github.io/jquery.businessHours/' was loaded over HTTPS, but ran insecure content from 'http://cdnjs.cloudflare.com/ajax/libs/rainbow/1.2.0/js/language/html.js': this content should also be loaded over HTTPS.
Add weekdays localization description usage to docs. see #8
Dear All,
I am trying to get this into my website. Unfortunatelly I have the following issue when saving the values with PHP
I have renamed the input fieds. day to day[] and startTime to startTime[] and endTime to endTime[]. In this way I would like to save the values by using an array. Unfortunatelly this is not working because you do not know, for example, which day was selected.
For example when i select monday and tuesday the day[0] and day[1] returns the value on. But when I select thursday and friday I still get day[0] and day[1] as on and not day[3] and day[4].
Do you have any ideas to get the values?
Thanks!
If an employee has a variable schedule in a day, enters at 9 and leaves at 13:00 then reenters at 15:00 and goes home at 19:00. Is this possible?
I'd like to localize week day names, but it is impossible with this plugin for now. Ye, I can edit source code, but it can be nice to have an option for that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.