keystonejs / keystone

The superpowered headless CMS for Node.js — built with GraphQL and React
https://keystonejs.com
MIT License
9.18k stars 1.15k forks source link

dateTime & calendardDay fields have no date picker #2185

Closed sinbargit closed 4 years ago

sinbargit commented 4 years ago

Bug report

As the doc descripte :

select Generates a drop-down menu that allows the user to select a value from a list auto Will generate a select if the range is 50 or less, otherwise will generate an input

But after I set the config below, there is still just a input component

posted: {
            type: DateTime, format: 'DD/MM/YYYY h:mm A',
            yearRangeFrom: 2020,
            yearRangeTo: 2030,
            yearPickerType: 'select',
        },

The screenshot is ss

wesbos commented 4 years ago

I asked them about this and apparently it's supposed to just be a text input. Would love if this used a date input

sinbargit commented 4 years ago

I asked them about this and apparently it's supposed to just be a text input. Would love if this used a date input

I am confused. Why the document said:

select Generates a drop-down menu that allows the user to select a value from a list auto Will generate a select if the range is 50 or less, otherwise will generate an input

What's that mean?

AllanFerencz commented 4 years ago

I'm also not sure what the documentation is referring to here 🤔

MadeByMike commented 4 years ago

I'll look at the docs but until then I wanted to give an update: We're actively working on https://github.com/keystonejs/keystone/pull/2922 which includes a better date-picker option.

We'd love reviews comments and contributions to that PR.

MadeByMike commented 4 years ago

Realising now this is also a duplicate of #215 - since this is the oldest issue I think it's best captured there. I'll update and cross link all relevant issues but this can mostly be tracked in the PR now.