# \<p:schedule> con GMT-5 para Panama

![](https://2578941663-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lc1Wg6ze2c8GK7mFBZX%2F-Lc1WjGeqF4Ig-44ZLgX%2F-Lc1X7CYN1mTctCBUCsM%2Fcalendario.png?generation=1554820662859061\&alt=media)

## pagina .xhtml

```java
   <p:schedule id="schedule"                           
       value="#{calendarioSolicitudController.eventModel}" widgetVar="myschedule" timeZone="GMT-5" locale="es">
      <p:ajax  event="eventSelect" listener="#{calendarioSolicitudController.onEventSelect}" update="eventDetails" oncomplete="PF('eventDialog').show();" />
      <!--<p:ajax  event="dateSelect" listener="#{calendarioSolicitudController.onDateSelectCalendar}" update="newDetails" oncomplete="PF('newDialog').show();" />-->
  </p:schedule>
```

## Controller

```java
private ScheduleModel eventModel;

private ScheduleModel lazyEventModel;

private ScheduleEvent event = new DefaultScheduleEvent();


 @PostConstruct
    public void init() {
        try {


            cargarSchedule();

        } catch (Exception e) {
            JsfUtil.errorMessage("init() " + e.getLocalizedMessage());
        }
    }// </editor-fold>
// <editor-fold defaultstate="collaps


 public void cargarSchedule() {
        try {

            Document doc = new Document("tipovehiculo.idtipovehiculo", tipovehiculo.getIdtipovehiculo()).append("estatus.idestatus", estatus.getIdestatus()).append("activo", "si");
            solicitudList = solicitudRepository.findBy(doc, new Document("fecha", 1));
            eventModel = new DefaultScheduleModel();
            if (!solicitudList.isEmpty()) {
                solicitudList.forEach((a) -> {
                    eventModel.addEvent(new DefaultScheduleEvent("# " + a.getIdsolicitud() + " Mision:" + a.getMision() + " Responsable: " + a.getUsuario().get(1).getNombre() + " " + a.getEstatus().getIdestatus(), a.getFechahorapartida(), a.getFechahoraregreso()));
                });
            }

        } catch (Exception ex) {
            JsfUtil.errorMessage("cargarSchedule() " + ex.getLocalizedMessage());
        }
    }// </editor-fold>
```
