Calendar plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • holtgrewe
    Indigo Rose Customer
    • Jul 2002
    • 779

    Calendar plugin

    This is not a big deal but was just wondering...

    When using the Calendar plugin I could not find a way to remove ONE special date.
    I worked around this by clearing all special dates Calendar.ClearSpecialDates("Plugin1") then add all the special dates back onto the calendar again.

    Is there a way to clear ONE special Date?
  • Ham
    Forum Member
    • Apr 2005
    • 188

    #2
    Maby this helps?

    Code:
    --Set the Text
    Input.SetText("input1","");
    --Get the selection
    tbSel = Calendar.GetSelection("calendar");
    if (tbSel) then
    	tbBlog[tbSel.Begin] = "";
    	--Remove the Selections special date (if it exists) because
    	--the text is blank
    	tbSpecial = Calendar.GetSpecialDates("calendar");
    	if (tbSpecial) then
    		Calendar.ClearSpecialDates("calendar");
    		--Now re-Add all special dates
    		for strCount, strDate in tbSpecial do
    			if (strDate ~= tbSel.Begin) then
    				Calendar.AddSpecialDate("calendar",strDate);
    			end
    		end
    	end
    end

    Comment

    • holtgrewe
      Indigo Rose Customer
      • Jul 2002
      • 779

      #3
      Thanks for the reply Ham.

      I was hoping there was a way to just clear One special date without clearing all the special dates and resetting them.

      The clear & reset happens so quickly it should never cause a problem with performance.

      Thanks.

      Comment

      • Roboblue
        Forum Member
        • Dec 2003
        • 892

        #4
        I started using SQLite instead of the CalNotes.txt.
        It's easier for me to do all the extra feature work.
        I can delete the Special Dates from the db, then just run the function to reload the calendar from the database. that works pretty fast, too.
        You can get an example of an SQLite calendar here.
        I was making text cal files for 3 year calendars in different formats, now I am just using db's with 5 year calendars in different formats that I keep updated using SQLITE Browser.
        Another cool thing about a using a database is I am putting in three extra fields that can be used to set several times during the day to be reminded of a special date. If there isn't a time set by the user, it checks and defaults to the three times I have set, globally. And the reminder can be turned on and off from another field I use in the db.
        it's my opinion that if you are going to use the Calendar plugin a lot, you should learn how to use SQLite to populate the plugin.

        Comment

        • holtgrewe
          Indigo Rose Customer
          • Jul 2002
          • 779

          #5
          Thanks for the helpful information. These were my first baby steps into the calendar plugin and all the help appreciated. Thanks again.

          Comment

          Working...
          X