Can we enable only Mondays on JIRA Date Picker?
Community moderators have prevented the ability to post new answers.
.calendar tr td.day:nth-child(-n+6){
background: #D8D8D8 ;
pointer-events: none ;
cursor: default ;
}
You can do it with less text: .calendar tr td.day:nth-child(-n+7){ background: grey; pointer-events: none; cursor: default; } Please see here for nth-child explanation: https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. It is perfectly working !! Thanks for the tip.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How did you choose to inject the JavaScript?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My datepicker was for a custom plugin. I am using a custom JS and CSS file to write the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do it via css.
For AUI date picker:
.aui-datepicker-dialog tr td:nth-child(n+2){ background: yellow; pointer-events: none; cursor: default; }
And here is a fiddle: http://jsfiddle.net/pnr39swu/
and similar approach for JIRA date picker when Sunday is configured as first day:
.calendar tr td.day:nth-child(2){ background: grey; pointer-events: none; cursor: default; } .calendar tr td.day:nth-child(n+4){ background: grey; pointer-events: none; cursor: default; }
Fiddle: http://jsfiddle.net/Lk4ggwdq/
When Monday is the first week day:
.calendar tr td.day:nth-child(n+3){ background: grey; pointer-events: none; cursor: default; }
If you need to disable days from code, jquery has similar selector method: https://api.jquery.com/nth-child-selector/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The above css is not calling. here is the snippet from vm file. <div class="project-config-date-field" id="week-dev"> <input id="week-input" name=week-input type="text" class="text medium-field" value="" title="Select a date" /> <a href="#" id="week-trigger" title="Select a date"> <span class="aui-icon icon-date">Select a date</span></a> </div>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, posted wrong fiddle. Correct one: http://jsfiddle.net/pnr39swu/ It works fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Volodymyr, Sorry I mentioned as AUI date picker. My bad.. I am actually working on JIRA Date picker component.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Volodymyr, Is there any workaround for disabling days on JIRA Date Picker?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi srinivas! Please see the update answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Volodymyr, Is there any workaround for disabling days on JIRA Date Picker? Hi Volodymyr, Is there any workaround for disabling days on JIRA Date Picker? Hi Volodymyr, Thank you for the comment.. It is working. Could you please tell me how to enable only Saturdays(Sunday is first day of calendar)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One more question: We have a disable function on the calendar to disable future dates and it was working. When we click the '>'(Next Month), the future date is capturing on text box though the calendar was found disabled. Appreciate if you could also tell us how to enable only Saturdays(Sunday is first day) disableFunc : function(date) { var today = new Date(); if (date >= today) { return true; } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Volodymyr, Can you please let me know how can I enable saturday of current week?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.