For some reason fullcalendar doesnt add fc-h-event class to events in my "dayGridMonth" view:
which ends up looking bad:
(the second event)
here are my options:
this.calendarOptions = {
plugins: [dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin],
locale: gbrLocale,
initialView: "dayGridMonth",
headerToolbar: {
start: "",
center: "",
end: ""
},
selectable: true,
events: this.fetchEvents,
editable: true,
showNonCurrentDates: false,
eventResizableFromStart: true,
dragScroll: true,
dayMaxEvents: 2,
navLinks: true,
dateClick: this.openAddNewEvent,
eventClick: this.openEditEvent,
eventDrop: this.eventDrop,
eventResize: this.eventResize
};
Any idea how to add this class in this view, or can u see mistake in my options?
It should be a normal behaviour where full day event is highlighted while time range event is marked with circle dot.
Here is the Codesandbox example with 2 types of event.
https://codesandbox.io/s/zen-darkness-fyfrz?file=/src/components/Calendar.vue
I was looking for option:
eventDisplay: "block"
Documentation: https://fullcalendar.io/docs/eventDisplay
Related
render chart view
how the chart looks
So I feel like I've tried everything under the sun to remove that red rectangle above the chart. Anyone know how to remove it? Most of the examples with setting up options and legend like below might work with chartjs but not vue-chartjs if I'm not mistaken.
options: {
legend: {
display: false,
},
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
You litterly posted the answer yourself, the second object in the renderChart function is the options object so if you put it like this it will work:
{ responsive: true, maintainAspectRatio: true, legend: { display: false } }
Next time please dont post a screenshot of your code but include it as text in your post since it is a lot easyer to read and use for people
Rails 3.2
I am using bootstrap-datetimepicker.js
I have the defaults set to:
$.fn.datetimepicker.defaults = {
maskInput: false,
pickDate: true,
pickTime: true,
pick12HourFormat: false,
pickSeconds: true,
startDate: new Date(),
endDate: Infinity,
orientation: "auto",
collapse: true
};
But when I try to pick date/time, if the form is at the bottom of the screen, it's cut off.
I set the orientation to "auto", and I understand that this is supposed to fix the problem, but it's not. Any suggestions?
Having problems with my table header becoming misaligned when I use "sScrollY". The header realigns itself only after I sort a certain column by clicking on one of the headers.
Misaligned.
Corrected only After I click on a sort header.
My Setting:
oTable = $('#userslist').dataTable({
"bJQueryUI": true,
"bRetrieve": true,
"sScrollY": "150px",
"bAutoWidth" : true,
"bPaginate": false,
"sScrollX": "100%",
"sScrollXInner": "100%",
"sPaginationType": "full_numbers",
"bAutoWidth": false,
"sDom": '<"H"lfr>t<"F"<"useraccountbtn">>',
"aaData": datan,
"aoColumns": [
{ "mDataProp": "uid"},
{ "mDataProp": "fn" },
{ "mDataProp": "un" },
{ "mDataProp": "pw" },
{ "mDataProp": "em" },
{ "mDataProp": "ac" }
]
});
I've also tried fnAdjustColumnSizing() which every Google Search seems to be suggesting but it doesn't do anything for me.
I have fix this way;
wrap the table with div and
CSS
overflow:auto;
height: 400px;
position:relative;
Remove
“sScrollY”
"sScrollX"
I've had to delay when data is loaded because when page loads it does not see the scroll bar and table headers get misaligned. But if I delay it, it sees the scroll bar and the table header matches up perfect.
<button onclick="delayload('loadusers()')">Load Table</button>
function delayload(f){
setTimeout(f,50)
}
function loadusers() {
oTable = $('#userslist').dataTable({
"bJQueryUI": true,
"bRetrieve": true,
"sScrollY": "150px",
"bAutoWidth" : true,
"bPaginate": false,
"sScrollX": "100%",
"sScrollXInner": "100%",
"sPaginationType": "full_numbers",
"bAutoWidth": false,
"sDom": '<"H"lfr>t<"F"<"useraccountbtn">>',
"aaData": datan,
"aoColumns": [
{ "mDataProp": "uid"},
{ "mDataProp": "fn" },
{ "mDataProp": "un" },
{ "mDataProp": "pw" },
{ "mDataProp": "em" },
{ "mDataProp": "ac" }
]
});
}
I had to remove the scrolling manually, because nothing else worked. Then I used #Suresh Kamrushi 's answer to make an external scrolling div
Here's the code if anyone needs it :)
//replace all scroll-related divs with their content (aka unwrap the content)
$('.table-responsive').replaceWith($('.table-responsive').html());
$('.dataTables_scroll').replaceWith($('.dataTables_scroll').html());
$('.dataTables_scrollHead').replaceWith($('.dataTables_scrollHead').html());
$('.dataTables_scrollBody').replaceWith($('.dataTables_scrollBody').html());
$('.dataTables_scrollHeadInner').replaceWith($('.dataTables_scrollBody').html());
$('.dataTables_sizing').each(function (index, value) {
$(this).replaceWith($(this).html());
});
//Re-size the header
$('#table_view_subs thead tr').attr("style","height:37.6px");
//add external scroll div
$("#table_view_subs").wrap("<div style='overflow:auto; width:100%;position:relative;'></div>");
It's very hacky, but if you've lost a week and your patience trying to get the DataTable to behave, you're not gonna care
Well, whenever you sort or filter and the contents of the table change in some way, fnDraw gets called. If an extra fnDraw is working (via clicking your sorting header after the table has loaded), and it isn't tied to bServerSide then trying an extra call to oTable.fnDraw() couldn't hurt.
Using ScrollX or scrollY create such problems. there is a work around for it:
$('#userslist').DataTable({
"initComplete": function (settings, json) {
$("#reportDetails").wrap("<div style='overflow:auto; width:100%;position:relative;'></div>");
},
});
First remove ScrollX or scrollY if you have in your page and add above code to fix it.
Try this:
$($.fn.dataTable.tables(true)).DataTable().columns.adjust();
I also had problems with ScrollX.
With wide tables it is a very big help. With narrow tables, as in the problem case above, I also had the same problem.
The problem arises because 3 tables are also made in one table. One for the header, one for the data and one for the footer.
The data part has the correct width. The header and footer are too short, so I enlarged them using CSS:
// Scroll-X
DIV.dataTables_scrollHeadInner,
DIV.dataTables_scrollFootInner{
min-width: 100%;
}
DIV.dataTables_scrollHeadInner > TABLE,
DIV.dataTables_scrollFootInner > TABLE{
min-width: 100%;
}
I am using extjs 4.0.7. I want to disabled tab and Enter key event when user using Combobox. I have tried to use keyUp and KeyDown event. But I didn't get any alert for it.
Here is my code:
{
xtype: 'combo',
store: ds,
id:'UserBO_SelectComponentId',
displayField: 'displayName',
valueField: 'userId',
typeAhead: false,
hideLabel: true,
disabled: false,
hideTrigger:true,
multiSelect:true,
delimiter: ";",
anchor: '100%',
triggerAction: 'all',
listeners: {
change: function( comboField, newValue, oldValue, eOpts ){
selectUserCallBack2(newValue,'UserBO_SelectComponentId',comboField,oldValue);
},
select:function(comboField,oldValue){
testRec(comboField,oldValue)
},
keypress:function(comboField,e){
disabledKeysOnKeyup(comboField,e)
}
},
listConfig: {
loadingText: 'Searching...',
enableKeyEvents: true,
emptyText: 'No matching posts found.'
},
pageSize: 10
}
Can anyone please suggest what is the problem here?
The keyup, keydown and keypressed events only fire if enableKeyEvents is set to true. Default this is set to false, so you need to add enableKeyEvents:true to the combobox config. And then do special treatment for enter and tab key.
You don't need to listen to key events and tab into that. What you want to do is set autoSelect to false. It's true by default. When set to false the user has to manually highlight an item before pressing the enter or tab key to select it (unless the value of typeAhead were true), or use the mouse to select a value.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-cfg-autoSelect
Here's my combobox in my grid:
{
id: 'PotentialforInsourcingKV',
header: 'Potential for Insourcing',
width: 30,
sortable: true,
dataIndex: 'POTENTIAL_FOR_INSOURCING',
flex: 1,
editor: {
xtype: 'combobox',
typeAhead: true,
triggerAction: 'all',
selectOnTab: true,
store: [
['1', 'Yes'],
['0', 'No']
],
lazyRender: true,
listClass: 'x-combo-list-small',
listeners:{
scope: this,
'select': function(combo, rec, idx){
onUpdateClick(combo, rec, idx)
}
}
}
},
the 'select' comes up with nothing? My grid is created by extending EXT.panel.Panel when I define the class. I'm using the cellEditing plugin. In the grid, selModel: 'cellediting' is set. What can I do?
Thanks in advance!
DS
Here you put the combobox in editor that's why now it will be controlled by cell editor. so you can validate your combo box value by following events of cell editor plugin
Events-->
beforeedit( Ext.grid.plugin.Editing editor, Object e, Object options )
Fires before cell editing is triggered. ...
edit( Ext.grid.plugin.Editing editor, Object e, Object options )
Fires after a cell is edited. ...
validateedit( Ext.grid.plugin.Editing editor, Object e, Object options )
Fires after a cell is edited, but before the value is set in the record. ...
& you can find it in more detail from here....
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.plugin.CellEditing