Skip to content Skip to sidebar Skip to footer

Javascript NoGray Calendar Add Number Of Days To Date, Check Availability After Chosen Blocked Dates If That Day Is Blocked

I previously asked a similar question at this location, Javascript NoGray Calendar find next available date after chosen blocked dates if today is blocked, for the check the a sing

Solution 1:

Yes, I was able to figure out the answer:

                onLoad: function()
            {
                var theDate = my_cal1.get_start_date().clone();
                theDate = theDate.from_string('today + 7');
                var st_dt = theDate.clone();
                console.log(this.is_selectable(st_dt)[0]);
                while(!this.is_selectable(st_dt)[0])
                {
                    st_dt = st_dt.from_string('today + 1');
                }
                // checking if no dates are selected
                if (!ng.defined(this.get_selected_date()))
                {
                    this.select_date(st_dt);
                }
                var origDate = my_cal1.get_start_date();
                this.set_start_date(origDate);
                this.set_selected_date(st_dt);
            },      

Thanks to anyone who was trying to solve this.


Post a Comment for "Javascript NoGray Calendar Add Number Of Days To Date, Check Availability After Chosen Blocked Dates If That Day Is Blocked"