Skip to content

MCP: Unable to Calendar widget's selected date — WidgetState coverage incomplete #7135

@sgardoll

Description

@sgardoll

Summary

The FlutterFlow AI MCP cannot author Calendar.onSelectedDateChanged.

The DSL's WidgetState(widgetName, property) expression — the documented way to read a widget's runtime value — explicitly excludes Calendar and exposes only value, text, and currentIndex (WidgetStateProperty enum). value is hard-coded to a closed list of widget types (Toggle, Checkbox, Dropdown, Slider, RadioGroup, PinCode) and throws if used against a Calendar.

The underlying proto clearly supports this — the editor produces actions that read Calendar's selected date — but the DSL surface doesn't expose the variable source/operation tree needed to construct one, and there is no documented example to reverse-engineer from.

Repro

In a FlutterFlow project, attempt the following via the flutterflow_ai DSL:

app.editPage('Daily', (page) {
  page.ensureActions(
    page.findByName('Calendar'),
    triggerType: FFActionTriggerType.ON_DATE_SELECTED,
    actions: [
      SetState('selectedDay', WidgetState('Calendar', WidgetStateProperty.value)),
    ],
  );
});

Result: Throws at compile time:

StateError: WidgetState(Calendar, value) requires a Toggle, Checkbox, Dropdown, Slider, RadioGroup, or PinCode target.

Source: .flutterflow/sdk/flutterflow_ai/lib/src/dsl/compiler.dart:7651-7663 (_widgetValueTypeForDslWidget).

Why this matters

This is a normal binding that any builder can do in two clicks in the FF editor:

Calendar → Actions → On Selected Date Changed → Update Page State → field = Calendar Widget State → Selected Date → Start Date

Every Calendar-on-a-page workflow needs it: filtering a list by day, navigating between days, querying date-scoped data. There's no DSL workaround short of writing raw protobuf, which:

  1. Has no documented example to crib from anywhere in references/, docs api-surface, or docs ui.
  2. Requires guessing the FFVariableSource / FFBaseVariable.widgetState shape for a non-action widget value (the existing FFWidgetStateVariable_ActionVariableType enum covers UPLOAD_DATA_URL, DATE_PICKER, TIMER_*, etc. — nothing for Calendar).
  3. Will silently break with any future schema rev because it's bypassing the typed surface.

Environment

  • flutterflow_ai SDK version: latest as of 2026-05-18
  • DSL files: dsl/edit.dart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions