Skip to content

Narrow DatePickerDialog has unnecessary scrollbar on months with 6 rows #141348

@parlough

Description

@parlough

Steps to reproduce

  1. Have a DatePickerDialog in your app that can reach its narrow form, and have M3 enabled
  2. Run the app (I tried macOS, CanvasKit, and skwasm)
  3. Open the date picker if necessary
  4. Adjust screen so DatePicker can be in its narrow mode
  5. Switch to a month that has 6 rows, such as December 2023
  6. Move mouse around within dates view to see scroll bar

Expected results

Since all rows can be displayed just fine in the dialog, no scroll bar should be there when moving the mouse. No scrolling is possible anyway.

Actual results

A scrollbar that does nothing shows up in weeks with 6 rows.

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: DatePickerDialog(
            initialDate: DateTime(2023, DateTime.december, 25),
            firstDate: DateTime.utc(2010),
            lastDate: DateTime.utc(2030),
          ),
        ),
      ),
    );
  }
}

Screenshots

Screenshot

Narrow DatePickerDialog with unnecessary scroll bar:
Narrow date picker with unnecessary scroll bar

Flutter version info

Version
Flutter 3.19.0-3.0.pre.43 • channel main • https://github.com/flutter/flutter
Framework • revision f961fdf2ba (4 hours ago) • 2024-01-10 17:37:07 -0500
Engine • revision a045134c91
Tools • Dart 3.4.0 (build 3.4.0-14.0.dev) • DevTools 2.31.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: date/time pickerDate or time picker widgetsf: material designflutter/packages/flutter/material repository.found in release: 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions