ionic-team / ionic-team/ionic-framework

feat: datetime, allow for optional year selection

Abierto
#24,806 1 comentario 6 reacciones 0 asignados Ver en GitHub
package: core type: feature request
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

The new ion-datetime component should support selection of a date without a specific year. If I add a birthday or a date (like named where year selection makes no sense) on the native address book of iOS (and a few android flavours I tried) the picker has option for year "----". The selected date then shows as Day-Month only with no year element.

![IMG_7533526322B9-1](https://user-images.githubusercontent.com/803983/154431394-c96a254d-0628-4b8b-99e4-dbeebab8011d.jpeg)

![Screenshot_20220217-100248_Contacts](https://user-images.githubusercontent.com/803983/154431823-1be803a2-77a6-4a30-bd02-05662225f7e0.jpg)

### Describe the Use Case

Select a date that is not defined by a year, such as a recurring date or range that does not have a defined start year or the year is not important.

### Describe Preferred Solution

An attribute that indicates the year selection is optional would be the ideal solution I believe. The Datetime component then would have an extra year option denoted as '----' which could set the year to an extreme (say 9999) to differentiate from an explicit year selection since a valid date has to be returned by the component in all modes.

### Describe Alternatives

_No response_

### Related Code

_No response_

### Additional Information

_No response_

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start by reading the ion-datetime component and its current date-value behavior. Define how an optional year is represented and how the picker displays the year-less option, then verify that recurring dates can be selected and returned as valid dates without an explicit year.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
frontend, mobile-dev
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.