NativeScript / NativeScript/plugins

[@nativescript/datetimepicker] Form with date field in Angular

オープン
#136 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
206
フォーク
123
平均マージ
2日 1時間
マージ済み PR(30日)
1

説明

Hello,

I use formGroup to do my forms in my app so I used to define my form fields with formControlName like this :

<TextField formControlName="kilometers" keyboardType="number"></TextField>

But when I put it with the datePickerField, my date variable to set the current date doesn't work anymore and it puts 1 january 1970 and when I click on the field 1 january 1900.
As soon as I remove my formControlName value, it works without any issue, like if there was a conflict between date and formControlName :

<DatePickerField #date formControlName="date" [date]="dateRefuel" [pickerTitle]="'Refuel.DateTitle' | L" [maxDate]="dateRefuel"></DatePickerField>

Do you have any idea how to fix this ? The only solution that I found is to put the #date and extract the value when I click on my send form button.

Thanks

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue にある DatePickerField Angular formControlName の例から始め、formControlName なしの同じフィールドと動作を比較します。現在の日付のバインディングと picker とのインタラクションを再現し、フォームで引き続き使用できるまま、日付が 1970 年 1 月 1 日や 1900 年 1 月 1 日にならなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend, mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。