0

[Closed]Calendar error message: Only allowed to move within fitted timeslot

asked 2014-11-05 14:17:03 +0800

kenshin gravatar image kenshin
18 1

updated 2015-01-20 15:59:59 +0800

Hi,

I have a error message: "Only allowed to move within fitted timeslot" when i try move event to another date/hour in Calendar component.

thanks

delete flag offensive retag edit

Comments

Please, close the question. Thanks

lramellavotta ( 2014-11-30 17:16:37 +0800 )edit

6 Answers

Sort by ยป oldest newest most voted
0

answered 2015-01-20 15:59:13 +0800

kenshin gravatar image kenshin
18 1

Thanks!

:)

link publish delete flag offensive edit
0

answered 2014-12-01 08:41:07 +0800

londapierros gravatar image londapierros
1
http://czym-sa-kredyty.bl...

thanks!! working really well!

link publish delete flag offensive edit
1

answered 2014-11-30 15:54:05 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

After many hours of testing I found the problem and the solution...

The problem was fired if you have the time of date "incorrect". Timeslot=2: the minute must set 0 or 30 Timeslot=4: the minute must set 0 or 15 or 30 or 45 Timeslot=6: the minute must set 0 or 10 or 20 etc...etc..

I hope this help you Luca

link publish delete flag offensive edit
0

answered 2014-11-29 17:15:02 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

I post the example to reply the errror

the Calendar class ext

public class CalendarEventExt extends SimpleCalendarEvent

{ private static final long serialVersionUID = 1L;

int cod_cliente;
int cod_chiamata;
int cod_agente;
Boolean modificato=false;

.....

the class:

public class zzz extends SelectorComposer<Component>

{

private static final long serialVersionUID = 1L;

private SimpleCalendarModel scm = new SimpleCalendarModel();

@Wire("#zzz")
Window zzz;

@Wire("#calendar")
private Calendars calendar;

@SuppressWarnings({ "unchecked", "rawtypes" })
@AfterCompose
public void afterCompose(@ContextParam(ContextType.VIEW) Component view)
{
    Selectors.wireComponents(view, this, false);

    //
    // Pulizia calendario
    //
    scm.clear();
    calendar.setCurrentDate(java.util.Calendar.getInstance().getTime());
    calendar.setFirstDayOfWeek(java.util.Calendar.getInstance().get(Calendar.DAY_OF_WEEK));
    calendar.setBeginTime(8);
    calendar.setEndTime(21);
    java.util.Calendar cal = java.util.Calendar.getInstance();

    CalendarEventExt sce=new CalendarEventExt();        
    sce.setBeginDate(cal.getTime());
    cal.setTime(sce.getBeginDate());
    cal.add(java.util.Calendar.HOUR, +1);
    cal.add(java.util.Calendar.MINUTE, +30);
    sce.setEndDate(cal.getTime());
    sce.setTitle("Appuntamento 1");
    sce.setContent("Indirizzo 1");
    scm.add(sce);   


    CalendarEventExt sce2=new CalendarEventExt();       

    cal.setTime(sce.getBeginDate());
    cal.add(java.util.Calendar.DAY_OF_MONTH, +1);
    sce2.setBeginDate(cal.getTime());

    cal.add(java.util.Calendar.HOUR, +1);
    cal.add(java.util.Calendar.MINUTE, +30);

    sce2.setEndDate(cal.getTime());
    sce2.setTitle("Appuntamento 2");
    sce2.setContent("Indirizzo 2");
    scm.add(sce2);      

    calendar.setModel(scm);
    calendar.invalidate();


    calendar.addEventListener("onEventEdit", new EventListener()
    {
        public void onEvent(Event e) throws InterruptedException
        {
            //apriEdit((CalendarsEvent)e);
        }
    });
    calendar.addEventListener("onEventUpdate", new EventListener()
    {
        public void onEvent(Event e) throws InterruptedException
        {
            //apriEdit((CalendarsEvent)e);
        }
    });
}

}

the zul:

<?page title="Gestione Agenda appuntamenti" contentType="text/html;charset=UTF-8"?>

<zk> <window id="Adm_agenda_visite" title="Gestione Agenda appuntamenti" border="normal" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('rvl.gm.ui.zzz')" validationmessages="@id('vmsgs')" closable="true">

    <calendars id="calendar"  height="500px" firstDayOfWeek="Sunday" mold="default" readonly="false" />

</window>

</zk>

link publish delete flag offensive edit
0

answered 2014-11-29 16:24:36 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

updated 2014-11-29 16:37:59 +0800

I think is a bug

If you edit the event changing the date, after you can move without problems the event....

link publish delete flag offensive edit
0

answered 2014-11-29 15:59:31 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

I have the same problem.

Luca

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2014-11-05 14:17:03 +0800

Seen: 28 times

Last updated: Jan 20 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More