0
votes

i got a question..

is there a option to get the deprecated single row calendar?` for example my old one is like this

like this

but is the class sap.me.Calendar and it is deprecated.. and it is leading me to " Deprecated as of version 1.26.0. This control was experimental since 1.12. Please use the sap.ui.unified.Calendar instead!"

but the ui.uinfied.Calendar dont have the option like singleRow="True" may i dont find it or im to stupid to see it :D

the ui.unifiend.Calendar looks like like this

so is there a option to get i like the deprecated?

thanks guys !!

1
I dont see a option for that, you most likely have to extend the control - Erch
Mhmm, when I am using the old one is it bad cause it is deprecated? Or it’s only don’t support anymore ? - Jünge alles
well not getting support is bad by itself... other than that i do not know why it got renewed in an other package, there might habe been other issues... just use the new one ;) - Erch
Thanks buddy, but for my understanding.. i cannot make it like the old one right ? Thanks - Jünge alles
it may be possible with the new one if you extend it - Erch

1 Answers

1
votes

Under the sap.ui.unified, there is this control called the CalendarDateInterval. I think this might be what you're looking for.

sap.ui.getCore().attachInit(() => sap.ui.require([  
  "sap/ui/core/mvc/XMLView",
], (XMLView) => {
  Promise.all([
    sap.ui.getCore().loadLibrary("sap.m", true)
  ]).then(() => XMLView.create({
    definition: `<mvc:View xmlns:mvc="sap.ui.core.mvc"
      xmlns="sap.m"
      xmlns:core="sap.ui.core"
      xmlns:u="sap.ui.unified"
      height="100%"
    >
    <u:CalendarDateInterval id="calendar" width="100%" select="handleCalendarSelect" showWeekNumbers="false"/>
    </mvc:View>`
    }).then(view => view.placeAt("content")));
}));
<script id="sap-ui-bootstrap"
  src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
  data-sap-ui-libs="sap.m"
  data-sap-ui-async="true"
  data-sap-ui-compatversion="edge"
  data-sap-ui-theme="sap_belize"
  data-sap-ui-xx-waitfortheme="true"
  data-sap-ui-xx-xml-processing="sequential"
></script>
<body id="content" class="sapUiBody sapUiSizeCompact" style="height: 100%;"></body>