Results 1 to 10 of 10

Thread: Read-only calendar

  1. #1

    Default Read-only calendar

    Hello,

    I am using the Ext JS 6 Ext.calendar.panel.Panel and I would like to set it to read-only mode as well as hide the side panel in which you can create events ? I cannot seem to find anything in the documentation that talks about how to set the calendar to read-only.

    Thanks!

  2. #2
    Sencha Premium User jvandemerwe's Avatar
    Join Date
    Apr 2009
    Location
    Raalte, Netherlands
    Posts
    249
    Answers
    7

    Default

    Quote Originally Posted by justinhenricks View Post
    Hello,

    I am using the Ext JS 6 Ext.calendar.panel.Panel and I would like to set it to read-only mode as well as hide the side panel in which you can create events ? I cannot seem to find anything in the documentation that talks about how to set the calendar to read-only.

    Thanks!
    What are you trying to achieve? What kind of use for the calendar do you have in mind?
    Professional Sencha ExtJS and PHP development since 2007

  3. #3
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Hi--,
    Have you tried setting the editForm/addForm configs to null?

    http://docs.sencha.com/extjs/6.5.3/c...l#cfg-editForm

    Bryan

  4. #4
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    FWIW here is an example to do a custom add/edit form but you can just set that to null.

    https://fiddle.sencha.com/#fiddle/1m7i&view/editor

  5. #5

    Default

    Quote Originally Posted by jvandemerwe View Post
    What are you trying to achieve? What kind of use for the calendar do you have in mind?
    Thank you for the reply. We have a calendar in which admins create events in our CMS and people with the app can then view the events.

    I have since successfully set the edit/add configs within the calendar package to null which almost gets me all of the way there. I need a custom 'Detail View' for events however.. when someone clicks on the event a popup (similar to edit) needs to come up and display all of the event details, including send an invite buttons.. etc.

    What is the best practice to do this ? Is it best to write code directly in the calendar package ? Or extend from it and keep the new view/functionality within our app code base?

    Thanks in advance!

  6. #6

    Default

    Quote Originally Posted by bjdurham85 View Post
    FWIW here is an example to do a custom add/edit form but you can just set that to null.

    https://fiddle.sencha.com/#fiddle/1m7i&view/editor
    Thanks for this ! This helps a lot.

  7. #7
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Somewhat similar to that Fiddle but I'd recommend extending your own Edit Form (changing titles of course) and adding/removing as you need. If you changed in the calendar package it could be replaced if you upgraded.

    Bryan

  8. #8

    Default

    Quote Originally Posted by bjdurham85 View Post
    Somewhat similar to that Fiddle but I'd recommend extending your own Edit Form (changing titles of course) and adding/removing as you need. If you changed in the calendar package it could be replaced if you upgraded.

    Bryan
    Awesome! Seeing how I don't need form fields though what could I extend from other then the Calendar Form as you did in the add example?

    Also, what would be the best way to override the tapevent handler to not show the editForm but to show my new custom Detail View?

    Thank you very much for the help.

  9. #9
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Take a look at the source for the Calendar.form.AbstractForm (below), you'll see that it ultimately extends from the window and sets the"type" as form. As long you extend from a window you should be able to set it up as your detail view. What are you thinking by the way, a dataview or something?

    http://docs.sencha.com/extjs/6.5.3/c...tractForm.html

    Bryan

  10. #10

    Default

    Yeah exactly, I guess I could just use dataview, I was just hoping to extend from something within Calendar so that it would easily look and feel the same way as all the rest of the calendar views.

    Without changing the onEventTap function in the Base file, what is the best way to override that so that I can show my custom detail view?

Similar Threads

  1. Create calendar event / appointment on device native calendar
    By alef22 in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 19 Apr 2017, 9:17 PM
  2. Calendar trouble: calendar.events not a function
    By fairport in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 26 Jan 2017, 9:19 PM
  3. Replies: 6
    Last Post: 12 Jun 2011, 11:07 PM
  4. Calendar in read only mode
    By reiben in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 3 Dec 2010, 1:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •