Constructor
new Property(jCal, parentopt)
Creates a new ICAL.Property instance.
It is important to note that mutations done in the wrapper directly mutate the jCal object used to initialize.
Can also be used to create new properties by passing the name of the property (as a String).
Name | Type | Attributes | Description |
---|---|---|---|
jCal | Array | | Raw jCal representation OR the new name of the property | |
parent | ICAL. | <optional> | Parent component |
- Source
Members
name :String
The name of this property, in lowercase.
- String
- Source
parent :ICAL.Component
The parent component for this property.
- Source
type :String
The value type for this property
- String
- Source
Methods
getDefaultType() → {String}
Get the default type based on this property's name.
- Source
The default type for this property
- Type:
- String
getFirstParameter(name) → {String}
Gets first parameter on the property.
Name | Type | Description |
---|---|---|
name | String | Parameter name (lowercase) |
- Source
Parameter value
- Type:
- String
getFirstValue() → {ICAL.Binary|ICAL.Duration|ICAL.Period|ICAL.Recur|ICAL.Time|ICAL.UtcOffset|Geo|string|null}
Finds the first property value.
- Source
First property value
- Type:
- ICAL.
Binary |ICAL. Duration |ICAL. Period |ICAL. Recur |ICAL. Time |ICAL. UtcOffset |Geo | string | null
getParameter(name) → {Array|String}
Gets a parameter on the property.
Name | Type | Description |
---|---|---|
name | String | Parameter name (lowercase) |
- Source
Parameter value
- Type:
- Array |
String
getValues() → {Array}
Gets all values on the property.
NOTE: this creates an array during each call.
- Source
List of values
- Type:
- Array
removeAllValues()
Removes all values from this property
- Source
removeParameter(name)
Removes a parameter
Name | Type | Description |
---|---|---|
name | String | The parameter name |
- Source
resetType(type)
Sets type of property and clears out any existing values of the current type.
Name | Type | Description |
---|---|---|
type | String | New iCAL type (see design.*.values) |
- Source
setParameter(name, value)
Sets a parameter on the property.
Name | Type | Description |
---|---|---|
name | String | The parameter name |
value | Array | | The parameter value |
- Source
setValue(value)
Sets the current value of the property. If this is a multi-value property, all other values will be removed.
Name | Type | Description |
---|---|---|
value | String | | New property value. |
- Source
setValues(values)
Sets the values of the property. Will overwrite the existing values. This can only be used for multi-value properties.
Name | Type | Description |
---|---|---|
values | Array | An array of values |
- Source
toICALString() → {String}
The string representation of this component.
- Source
- Type:
- String
toJSON() → {Object}
Returns the Object representation of this component. The returned object is a live jCal object and should be cloned if modified.
- Source
- Type:
- Object
(static) fromString(str, designSetopt) → {ICAL.Property}
Create an ICAL.Property by parsing the passed iCalendar string.
Name | Type | Attributes | Description |
---|---|---|---|
str | String | The iCalendar string to parse | |
designSet | ICAL. | <optional> | The design data to use for this property |
- Source
The created iCalendar property
- Type:
- ICAL.
Property