Disable drag on create event - fullcalendar

I'm trying to disable the dragging function when a user create a event.
My events should have a fixed duration of 30 min.
I'm using version 2.0.3 of fullcalendar.
I've tried using, but that do not help.
eventDurationEditable : false,
Any ideas as how to prevent dragging on create?
/Birger

Use Event start editable to false.
eventStartEditable:false,
More info: https://fullcalendar.io/docs/v1/eventStartEditable

Related

All day events to be "busy" by default

I want my all day events in google calendar to be set as busy by default. How does one do that? Currently, when I have an "all day event" I am shown as available and I have to change it manually. How do I make it busy by default?
I am shown busy by default only when there is specific time set up. This looks all sorts of backwards to me!
You can achieve the functionality you are describing by using Apps Script.
You can make use of the Calendar Service to create a script and set the transparency property for the events from today to "opaque".
According to the documentation:
transparency - Whether the event blocks time on the calendar. Optional. Possible values are:
"opaque" - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI.
"transparent" - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI.
And in order to call this script, you can create a time-driven trigger which will run every day, something similar to this:
function createTrigger() {
ScriptApp.newTrigger("busyEvents")
.timeBased()
.atHour(12)
.everyDays(1)
.create();
}
Calendar API Events:update;
Apps Script Installable Triggers.

fullcalendar firstHour option after initialization

do you know if it is possible to set firstHour option after initialization.
I tried : $('#calendar').fullcalendar('options', 'firstHour', 10);
But it does'nt work.
Why do I need this :
I have an html file to create events, I would like the calendar to scroll to the the hour the user have selected/submitted.
regards
Use scrollTime to determine how far down the scroll pane is initially scrolled down.
scrollTime: '10:00:00',
Setting options dynamically like you are trying to do is only supported as of version 2.9.0
I have seen people successfully set options using the following code before the functionality to dynamically set options became available:
$('#calendar').fullCalendar('getView').calendar.options.firstHour = 9;
$('#calendar').fullCalendar('render');

FullCalendar (1.6) difficulty updating existing event on calendar with renderEvent

I'm using an older version of fullCalendar (1.6.4) with mostly success. I've got a UI that has the ability to add new events to the calendar, and then edit them inline. I'm running into problems when I try to then update the calendar with the modified event object. I'm only running into this problem however with dynamically added events, I can apparently reload the page and update events that fullCalendar adds initially just fine.
The problem seems very related to how the event.source property works. When the property is null on the event, fullCalendar pushes a new instance of the event onto the "cache" object, even if the event otherwise exists on the calendar already. I'm not sure why or how this works. For whatever reason though, I then end up with duplicate instances of the event on the calendar day.
// code directly from fullCalendar 1.6.4
function renderEvent(event, stick) {
console.log('renderEvent',event)
normalizeEvent(event);
if (!event.source) {
if (stick) {
stickySource.events.push(event);
event.source = stickySource;
}
cache.push(event);
}
reportEvents(cache);
}
So, in cases that are a pure edit of an existing calendar item, I make sure the source value is set and not lost/nulled anywhere. Even if worst case it does the below and sets it to an empty object. (Note, this may be a cause of my problems, I just don't know enough about full calendar). Sometimes I even have to force it to be {}, otherwise it has multiple items in source and I again end up with duplicate calendar entries after updating.
calEvent.source = calEvent.source ? calEvent.source : {};
I then update my existing calendar with a call to renderEvent.
$('#calendar').fullCalendar( 'renderEvent', calEvent, true);
Unfortunately, I'm running into the case where the new calEvent sent to renderEvent is updated, and it does not update the instance on the calendar. This may be because of the source field? And it only happens for newly dynamically added events.
Can someone assist about how to properly edit events? And how this source field should properly be used.

Soft keyboard issue in flex 4.6

I am building a tablet application which contains a login form. I am using soft keyboard to enter credentials and I am doing 'stage.focus=null' to hide softkeyboard, after this if I open a popup it is coming in half of the screen.
I found solution to my problem, I resolved this after setting resizeForSoftKeyboard property to SkinnablePopUpContainer.
Thakns,
Gopi.
This post here gave me some hints http://forums.adobe.com/message/4068144 but didn't fix my problem. What finally worked for me was 'forcing' the keyboard to close by resetting the focus and deferring my state change until afterwards.
callLater(setFocus); // set focus to current view
callLater(function():void { /*.. my state change code ..*/ });
The way we fixed this problem was to fire our own deactivate event on our TextInput.
callLater(function():void {
myTextInput.dispatchEvent(new SoftKeyboardEvent(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, true, false, null, "contentTriggered"));
});

Disabling the ability to increase length of an event - Full Calendar

I have searched through the full calendar documentation and tried a couple of solutions but nothing has worked. I am using full calendar within a website that renders events into it using JSON. Editable is set to true to enable users to alter the date of a position. However, regardless of setting disableResizing to false, the events can still be dragged from the right to extend them across multiple days.
How do I definitively disable this function, and do so without it effecting the current ability to drag and move events to different days. Any help on this would be great.
Many Thanks!
Ah I think the key may be here 'regardless of setting disableResizing to false'. I think you may want to set disableResizing to true!
Nevertheless make sure that options that have true/false values are not strings "true"/"false", or else somthings might not work like allDay option for events.
Doesnt work:
allDay:"true"
Work's
allDay:true

Resources