## Custom event dialog

The sample demonstrates how to create new custom event dialog.

Options used in the sample:

- editEventDialogTemplate - use this option in order to replace built-in event dialog content.

Events used in the sample:

- beforeEditEventDialogShow - occurs before the built-in event dialog is shown. Return false or call event.preventDefault() in order to cancel event and prevent the built-in dialog to be shown. Event parameters: e - jQuery.Event object. args - event arguments: args.data - the event object data, args.targetCell - target offset DOM element which can be used for popup callout.

Bellow is the event object syntax which is passing to beforeEditEventDialogShow event handler (args.data).

    		     id - String, unique event id, this field generated automatically;
    				calendar - String, calendar id to which the event belongs;
    				subject - String, event title;
    				location - String, event location;
    				start - Date, start date/time;
    				end - Date, end date/time;
    				description - String, event description;
    				color - String, event color;
    				allday - Boolean, indicates all day event
    				tag - String, this field can be used to store custom information.

    				parentRecurrenceId - String, id of the event object that
    						defines the recurrence criteria for this event object.
    						If an event is recurring it represents an occurrence in the series that is
    						started and defined by a specific pattern event.
    						Use the getPatern method in order to obtain the pattern
    						of the current event. A pattern event can be recognized by its
    						recurrenceState field set to the "master" value.
    						The recurrence information defined by the pattern event
    						can be accessed  via the recurrencePattern field of the event.
    						If this event is a not member of a recurrence,
    						or is itself a root event, this field will be null.
    				recurrenceState - String, indicates the recurrence state of the event.
    						(possible values are "notRecurring"(or null), "master", "occurrence",
    						"exception", "removed")
    				recurrencePattern - Object, represents the recurrence attributes
    						of an event. Only master events can have this field
    						(recurrenceState is "master")
    						Object syntax:
    						parentRecurrenceId - String, id of the event object
    							which represents the master event for this
    							recurrencePattern object.
    						recurrenceType - String, determines the type of recurrence:
    							daily - the recurring event reoccurs on a daily basis.
    							workdays - the recurring event reoccurs every working day.
    							monthly - the recurring event reoccurs on a monthly basis.
    							monthlyNth - the recurring event reoccurs every N months.
    							weekly - the recurring event reoccurs on a weekly basis.
    							yearly - the recurring event reoccurs on an yearly basis.
    							yearlyNth - the recurring event reoccurs every N years.
    						interval - Number, specifies the interval between occurrences
    							of the recurrence.
    							The interval field works in conjunction with
    							the "recurrenceType" field to determine the cycle of the recurrence.
    							The maximum allowable value is 99 for weekly patterns and 999
    							for daily patterns.
    							The default value is 1.
    							For example, if the recurrenceType is set
    							to daily, and the "interval" is set to 3,
    							the recurrence will occur every third day.
    						startTime - Date, indicates the start time for the given
    							occurrence of the recurrence pattern.
    						endTime - Date, indicates the end time for the given
    							occurrence of the recurrence pattern.
    						patternStartDate - Date, indicates the start date of the
    							recurrence pattern.
    						patternEndDate - Date, indicates the end date of the
    							recurrence pattern.
    							This field is optional but must be coordinated
    							with other fields when setting up a recurrence pattern.
    							If this field or the "occurrences" field is set,
    							the pattern is considered to be finite, and the "noEndDate"
    							field is false.
    							If neither "patternEndDate" nor "occurrences" is set,
    							the pattern is considered infinite and "noEndDate" is true.
    							The "interval" field must be set before
    							setting "patternEndDate".
    						occurrences - Number, the number of occurrences for the
    							recurrence pattern.	This field allows the definition of
    							a recurrence pattern that is only valid for the specified
    							number of subsequent occurrences.
    							For example, you can set this property to 10 for a formal
    							training  course that will be held on the next ten Thursday
    							evenings. The default value is 0. This field must be
    							coordinated with other fields when setting up a recurrence pattern.
    							If the "patternEndDate" field or the "occurrences" field
    							is set, the pattern is considered to be finite and the
    							"noEndDate" field is false.
    							If neither "patternEndDate" nor "occurrences" is set,
    							the pattern is considered infinite and "noEndDate" is true.
    						instance - String, determines the week in a month in which
    							the event will occur. This field is only valid for recurrences of
    							the "monthlyNth" and "yearlyNth" types and allows the definition
    							of a recurrence pattern that is only valid for the Nth occurrence,
    							such as "the 2nd Sunday in March" pattern.
    							The default value is "first".
    							Possible values are:
    								first - the recurring event will occur on the specified
    									day or days of the first week in the month.
    								second - The recurring event will occur on the specified
    									day or days of the second week in the month.
    								third = - The recurring event will occur on the specified
    									day or days of the third week in the month.
    								fourth - The recurring event will occur on the specified
    									day or days of the fourth week in the month.
    								last - The recurring event will occur on the specified
    									day or days of the last week in the month.
    						dayOfWeekMask - String, contains set of values representing the mask
    							for week days on which the recurring event occurs.
    							Monthly and yearly patterns are only valid for a single day.
    							The default value is "none".
    							When the "RecurrenceType" field is set to "daily",
    							the "DayOfWeekMask" field can only be set to "everyDay";
    							setting the field to any other value will result in an exception.
    							When the "recurrenceType" field is set to
    							"workdays", the "dayOfWeekMask" field
    							can only be set to "workDays"; setting the field
    							to any other value will result in an exception.
    							When the "recurrenceType" field is set to
    							"weekly", the "dayOfWeekMask" field
    							cannot be set to "none"; doing so will result
    							in an exception being thrown.
    							When the recurrenceType" field is set to
    							"monthly" or "yearly" the "dayOfWeekMask" field is not applicable.
    							Possible values are:
    								none - no specific value; the actual value is obtained from
    									the root event object.
    								sunday - specifies Sunday.
    								monday - Specifies Monday.
    								tuesday - Specifies Tuesday.
    								wednesday - Specifies Wednesday.
    								thursday - Specifies Thursday.
    								friday - Specifies Friday.
    								saturday - Specifies Saturday.
    								weekendDays - Specifies Saturday and Sunday (or what ever days according
    									to the settings of the C1EventsCalendar).
    								workDays - Specifies work days (all days except weekend).
    								everyDay - Specifies every day of the week.
    						dayOfMonth - Number, the number of the day in its respective month on which
    							each occurrence will occur. Applicable only when the recurrenceType
    							field is set to "monthly" or "yearly".
    							The default value is 1.
    						monthOfYear - Number, indicates which month of the year is valid
    							for the specified recurrence pattern. Can be a number from 1 to 12.
    							This field is only valid for recurrence patterns whose recurrenceType"
    							field is set to "yearlyNth" or "yearly".
    							The default value is 1.
    						noEndDate - Boolean, indicates if the recurrence pattern is endless.
    							The default value is True. This field must be coordinated with
    							other fields when setting up a recurrence pattern. If the patternEndDate field
    							or the occurrences field is set, the pattern is considered
    							to be finite and the "noEndDate" field is false.
    							If neither patternEndDate nor occurrences is set,
    							the pattern is considered infinite and "noEndDate" is true.
    						exceptions - Array, holds the list of event object ids that
    							define the exceptions to that series of events.
    							This field is read-only.
    						removedOccurrences - Array, holds the list of event object's ids
    							removed from that series of events.