Skip to content

[Bug] X-Properties lose their type when parsed from ical #1238

@niccokunzmann

Description

@niccokunzmann

Describe the bug

X- properties can have their type set. However, we lose that information on runtime.

To reproduce

import icalendar
cal = """
BEGIN:VCALENDAR
X-FILTER-DATE-RANGE;VALUE=PERIOD:20250202T000000/20250203T000000
END:VCALENDAR
"""
calendar  = icalendar.Calendar.from_ical(cal)
print(calendar["x-filter-date-range"])

Output:

vText(b'20250202T000000/20250203T000000')

Expected behavior

This should be vPeriod

Environment

  • Operating system: linux
  • Python version: 3.13
  • icalendar version: 7.0.1

Additional context

  • I tested it with the latest version. For example, I used the command pip3 install --upgrade https://github.com/collective/icalendar.git.
  • I attached the .ics sample file, or there is no .ics sample file.

See also:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions