Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting datepicker #83

Open
amrutavarsh opened this issue Dec 3, 2023 · 2 comments
Open

Formatting datepicker #83

amrutavarsh opened this issue Dec 3, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@amrutavarsh
Copy link

amrutavarsh commented Dec 3, 2023

Not sure if this is a bug or an error in my implementation but i'm unable to correctly format the datepicker. Attaching my current code and view

BottomPicker.date(
    title: 'Date of birth',
    dateOrder: DatePickerDateOrder.dmy,
    initialDateTime: dateOfBirth,
    maxDateTime: DateTime.now(),
    minDateTime: DateTime(1923),
    titleStyle: TextStyle(
      fontWeight: FontWeight.bold,
      fontSize: 16,
      color: Color(0xFF4202A6), // Assuming this is the title color
      letterSpacing: -0.3,
    ),
    titlePadding: EdgeInsets.only(top: 15), // Adjust padding to align the title with the close button
    onChange: (index) {
      HapticFeedback.lightImpact();
    },
    onSubmit: (index) {
      print("DATE");
      print(index);
      dateOfBirth = DateFormat('dd MMM yyyy').format(index);
      _submitForm();
    },
    pickerTextStyle: TextStyle(
      color: Colors.black,
      fontSize: 18,
      letterSpacing: -0.3,
    ),
    buttonText: 'Confirm',
    buttonTextStyle: TextStyle(
      color: Colors.white,
      fontWeight: FontWeight.w600,
      letterSpacing: -0.2,
    ),
    buttonSingleColor: Color(0xFF4202A6),
    displayButtonIcon: false,
    buttonPadding: 10,
    dismissable: true,
    height: 350,
).show(context);
                          
Screenshot 2023-12-03 at 2 51 46 PM

I want to make the following changes:

  1. The Title and close button don't seem to be aligned
  2. Not able to change the grey color selected area to a lighter color
  3. There is some unnecessary space between the title and picker
  4. The picker doesn't extend all the way to the edges

Thanks!

@amrutavarsh amrutavarsh changed the title Issues formatting datepicker Formatting datepicker Dec 3, 2023
@koukibadr koukibadr self-assigned this Dec 10, 2023
@koukibadr koukibadr added the enhancement New feature or request label Dec 10, 2023
@tiltmaster
Copy link

tiltmaster commented Sep 23, 2024

is this even fixed? its still not possible with dateTime

@koukibadr
Copy link
Owner

@tiltmaster still not fixed I'll work on it and let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants