I don't want to show the first week of the following month in the calendar. Can not see anything in docs https://flatpickr.js.org/options/
A bit of CSS jiggery pokery gets the results I need.
Hide the empty additional week into next month:
.nextMonthDay {
&:nth-last-child(-n+7) {
display: none;
}
}
Hide all into next month:
.nextMonthDay {
display: none;
}
Hide all from previous month (uses visibility instead of display to preserve alignment beneath day names:
.prevMonthDay {
visibility: hidden;
}
Related
I'm using Report Studio Version 10.2.2 and I have a question regarding value prompts.
I've got a report with a prompt page that works great. I set up a value prompt as a multi-select, check box group with default selections. I'd like to give a visual queue to the end user by changing the font color for the "Default Selections" to red.
How do you change the font color for specific display values in a value prompt?
JavaScript
You can add an HTML item before the value prompt:
<span id="MyList">
...and an HTML item after the value prompt...
</span>
<style>
.MyRedClass {
color: #ff0000;
font-weight: bold;
}
</style>
<script>
var s = document.getElementById("MyList");
var divCollection = s.getElementsByClassName("clsCheckBoxRow");
var isPositive = function(n) {
return n > 0;
}
for (var d = 0; d < divCollection.length; d++) {
switch (true) {
case isPositive(divCollection[d].innerHTML.indexOf("CORPORATION FOR PROFIT")):
case isPositive(divCollection[d].innerHTML.indexOf("CORPORATION NON PROFIT")):
case isPositive(divCollection[d].innerHTML.indexOf("INDIVIDUAL")):
divCollection[d].classList.add("MyRedClass");
break;
default:
break;
}
}
</script>
Problems:
You will need to maintain the list of default values in two places.
(Or you could abandon the Default selections property and use
JavaScript to set the defaults.)
My code looks for a class named
clsCheckBoxRow. That may not work for users using a different theme
(?). I don't know because I didn't bother testing.
If any of the default values match text that is in the HTML (other than the value -- unlikely), you'll need to make the search more specific. (like digging deeper into the DOM)
This may be challenging to upgrade to the Interactive Viewer in Cognos Analytics.
How can I position last n root menu items to the right? Let's say I want to position Item 3, and Item 4 from this plunkr at the end of menu row (on the right).
Something like this:
I don't see any API in documentation that would describe such scenario.
You can set margin-left: auto on the third item.
.k-item.k-menu-item:nth-child(3) {
margin-left: auto;
}
https://plnkr.co/edit/IhNuEvI52yID0bCK
I have a check box group with multiple items that may contain a space. It is a horizontal check box. What is happening is the items are wrapping where there is a space in the item.
How could I get them to not wrap?
Also how do I control the width? I tried setting the width of the control and even placed it in a panel with the width set but nothing seems to work.
Try something like this in your stylesheet for the application:
.xspCheckBox { width: 500px; /* change to your preferred width */ }
.xspCheckBox td { white-space: nowrap; }
I have a YUI datatable and I am putting the following data in the table:
{key:"name", label:"name", editor: nameChoiceEditor},
{key:"group", label:"group", editor: groupChoiceEditor},
{key:"colony", label:"colony", width: 210, editor: colonyChoiceEditor},
...
Here the name column's width is set to the maximum length of characters entered for that name, and the same with group. colony's column width is set to 210 irrespective of the length of the data.
My problem is when the name column, having multiple words like "odaiah chitukuri", is showing in two lines like so:
odaiah
chitukuri
But when it is one word like "odaiahchitukuri" it is showing in a single line, meaning the column is adjusting to fit the word.
I should have the different words in sigle line. How to do that?
Have the 'breaking' spaces replace with non-breaking spaces.
Try the following:
Change:
{key:"colony", label:"colony", width: 210, editor: colonyChoiceEditor},
To:
{key:"colony", label:"colony", width: 210, editor: colonyChoiceEditor
formatter: function (el, oRecord, oColumn, oData) {
el.innerHTML = oData.replace(/ /g, ' ');
}
},
I'm not sure if your looking for a solution that will always keep the words on a single line.. but generally speaking the datatable does a good job of spacing out the columns correctly based on the content inside. In certain cases though I've definitely had to set the width of a column manually. Here is an example for a column with class appicon:
.yui-skin-sam .yui-dt tbody td.appicon {
width: 40px;
}
Bare in mind once the number of words in the column stretches past it's defined size, it will always move to the next line.
In datatable column define :
will be width:100
not width:"100px"
or width:"100"
or width:"100em"
Use width: 100
like that then its working fine for me
We're looking to give pages in a specific category a specific background colour. Since every page in this category makes use of a specific template, we're ideally looking for a template change.
Can this be done?
Use the PageCSS extension, you should be able to put the css in your template, which would then apply to the pages it is on.
example:
<css>
#bodyContent { background-color: yellow; }
</css>
For the MediaWiki 1.18, you only need CSS and this code:
{{#css:
#bodyContent { background-color: yellow; }
body {
background: navajowhite;
}
}}
This will give the part of the page with text a yellow colour and the rest (border) a brown-ish colour.
For best results, put this in a template, e.g. {{Page colour}}, so that it can be called with, e.g. {{Page color|red|yellow}}. The template code will then be:
{{#css:
#bodyContent { background-color: {{{1|yellow}}}; }<!-- Page color -->
body {
background: {{{2|navajowhite}}};<!-- Border color -->
}
}}
where 1 & 2 are parameters (page and border respectively) with default colours (yellow and brownish).