Ng-zorro-antd: Problem to set date manually datepicker when chage nzFormat

Created on 20 Nov 2018  ·  10Comments  ·  Source: NG-ZORRO/ng-zorro-antd

Version

1.8.0

Environment

Windows

Reproduction link

https://ng-zorro-antd-start-cekrxg.stackblitz.io

Steps to reproduce

Set dateformat to yyyy-MM-dd in the nz-datepicket, after set date manually in the input box datepicker a date for example 2018-01-01

What is expected?

Ever

What is actually happening?

Problem to set manually date when dateFormat is changed. For example, if you set nzFormat to yyyy/MM/dd set date manually work fine, the datepicker set a date like 2018/01/01 then hide, this is ok. But when nzFormat is set to yyyy-MM-dd, set date manually not work, the datepicker is maintain visible and if you does click outside the calendar the date is not set

Other?

i18n DatePicker 👨‍🏭 Some one working on this

Most helpful comment

@wenqi73 date-fns has now released 2.0.0 so can this be looked at again please?

All 10 comments

kapture 2018-11-21 at 12 18 22

It seems everything works fine in your repro link, Would you plz provide more detail information?

You must set the date manually typing in the input box from the datepicker

I confirm the defect. Manual input only works if the format is using "/" . Any format otherwise don't work.
What's funny is that the doc page is using the "-" format. Go take a look and you'll see it's not working.

Ok, then can you repair this? I stopped using ng-zorro because this... LOL
In Chile this is very important, because the people often digit the date
not picker... thanks for you reply...

El El mié, 12 de jun. de 2019 a las 10:40, Mathieu Bélanger <
[email protected]> escribió:

I confirm the defect. Manual input only works if the format is using "/" .
Any format otherwise don't work.
What's funny is that the doc page is using the "-" format. Go take a look
and you'll see it's not working.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/NG-ZORRO/ng-zorro-antd/issues/2492?email_source=notifications&email_token=ADYT2RFNQDJFDOJ32FV74MDP2EDGPA5CNFSM4GFMKJ72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQUYUA#issuecomment-501304400,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADYT2RBO2XQHMN7UOV353Z3P2EDGPANCNFSM4GFMKJ7Q
.

>

Saludos,

Fabián E. Beas Pizarro
Ingeniero en Informática

[image: image.png]

Coordinador Distrital Unidad de Guías

Responsable de Unidad
Grupo Fernando de Aragón

Móvil: +56995482747

@FabianBeas I don't have the time right now to do it, but why don't you simply switch the format to something like "yyyy/MM/dd" ? With this one the manual input is working.

The official format for Chile is dd-MM-yyyy otherwise is rare... Common
users don’t understand or it is difficult for them...

El El mié, 12 de jun. de 2019 a las 11:00, Mathieu Bélanger <
[email protected]> escribió:

@FabianBeas https://github.com/FabianBeas I don't have the time right
now to do it, but why don't you simply switch the format to something like
"yyyy/MM/dd" ? With this one the manual input is working.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/NG-ZORRO/ng-zorro-antd/issues/2492?email_source=notifications&email_token=ADYT2RDYTUCWYF53GM56YGTP2EFQRA5CNFSM4GFMKJ72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQXAWQ#issuecomment-501313626,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADYT2RC7YJ4ESNGH3A5ZQP3P2EFQRANCNFSM4GFMKJ7Q
.

>

Saludos,

Fabián E. Beas Pizarro
Ingeniero en Informática

[image: image.png]

Coordinador Distrital Unidad de Guías

Responsable de Unidad
Grupo Fernando de Aragón

Móvil: +56995482747

N3LAhgDE8U
@FabianBeas It works fine now.

This not work for format dd-MM-yyyy

El El mié, 19 de jun. de 2019 a las 08:01, Wenqi notifications@github.com
escribió:

[image: N3LAhgDE8U]
https://user-images.githubusercontent.com/23337087/59763600-84c50980-92cc-11e9-9cdd-dbe65ca478ff.gif
@FabianBeas https://github.com/FabianBeas It works fine now.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NG-ZORRO/ng-zorro-antd/issues/2492?email_source=notifications&email_token=ADYT2RHNFXDC6X7HFTNVSXDP3IN3DA5CNFSM4GFMKJ72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBUMPI#issuecomment-503531069,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADYT2RFPMBKUI4NX7GMTYCLP3IN3DANCNFSM4GFMKJ7Q
.

>

Saludos,

Fabián E. Beas Pizarro
Ingeniero en Informática

[image: image.png]

Coordinador Distrital Rama Guías

Responsable de Unidad

Grupo Fernando de Aragón

Móvil: +56995482747

Waiting dateFns update to 2.0.0 stable version which support parse.

@wenqi73 date-fns has now released 2.0.0 so can this be looked at again please?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhouwf108 picture zhouwf108  ·  3Comments

bambooj picture bambooj  ·  4Comments

linjianhong picture linjianhong  ·  3Comments

Ximena-con picture Ximena-con  ·  3Comments

ismezy picture ismezy  ·  3Comments