[Bug] Hiding week days + Year view

Hello there, sadly again…

perhaps i am the only one, but i am using the ignore_month-Function, to hide Saturday/Sunday from month-view. I also use the year-view - And this brings trouble :slight_smile:

If you switch into the month-view, of course the ignored days are getting the extra class dhx_scale_ignore , but also in year view :slight_smile: I am not 100% sure, but i think, that both views grab the same delivered data and show them in a different way (right?), that’s why i don’t have an idea how to fix this.

I tested it with the basic sample (01_month_ignore) and added only the year-button and .js -> Same behaviour.

I also tried to kick out the weekend completely from the year view (need littel tweaks in either dhtmlxscheduler_year_view.js and dhtmlxscheduler.js, so not going to tell here how to), but than my client informs me, that he want the weekends (only) in year view :confused: So i have to fix this anyway…

Perhaps i can try further on my own, when i can understand how it exactly works (i know that the _render_month_scale function is responsible for the output, and i also found the place where the extra class is added, but i don’t get, if this function is called ONCE or TWICE (from each view month and year)…

Sorry for bothering with 2 Threads,
i think this could be interessting for other, too.

Okay, perhaps i get it - it is called 12 times in year view… So i THINK i just simply need to carry the information “For which view is this” to the function, and than i could give it a if-than-else for ignoring the “hide this day” commands,…

Do i need to carry the information about the actuall view through the functions (so i need to change twi functions in the dhtmlxscheduler.js) or is it possible to ask this from within the function itself?
Something like if(actualView == “year”) {} ?

Poorly i can not delete my entries, but i fixed it myself… I found the function in your docu!

I will write down the easy bugfixing, perhaps you want to review this within your upcoming releases or so (all in dhtmlxscheduler.js in function scheduler._render_month_scale):

if (this._ignores_detected && this._ignores[j]){

if (this._ignores_detected && this._ignores[j] && scheduler.getState().mode == “month”){

if (!this._ignores_detected || !this._ignores[j]){

if (!this._ignores_detected || !this._ignores[j] || scheduler.getState().mode == “year”){[/code]

By the way, i could only work with the uncompressed version of the JS-Sourcefile. In the compressed version i can not tell you how you are able to change, because of it’s unreadable compression :frowning:

I hope i can help someone out…