Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need help #14

Open
snehabihani opened this issue Mar 21, 2023 · 0 comments
Open

I need help #14

snehabihani opened this issue Mar 21, 2023 · 0 comments

Comments

@snehabihani
Copy link

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()));
                });
        });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant