NativeScript / NativeScript/plugins

nativescript vue DatePickerField no v-model support?

Đang mở
#335 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
206
Fork
123
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Appologies in advance if i'm doing something wrong, found it weird noone else reported this.

Tried all sorts of combinations, binding to a string or a Date() but no luck.

<DatePickerField hint="Birthdate" :minDate="minDate" :maxDate="maxDate" v-model="birthDate" />

export default class About extends Vue {
minDate = new Date("1900-01-01");
maxDate = new Date("2010-01-01");
birthDate = new Date("2000-01-01");
...

An uncaught Exception occurred on "main" thread.
Calling js method onCreateView failed
TypeError: dateTime.getTime is not a function

StackTrace:
formatDateTime(file:///data/data/org.blah/files/app/vendor.js:43966:54)
at getFormattedDate(file:///data/data/org.blah/files/app/vendor.js:43169:89)
at updateText(file:///data/data/org.blah/files/app/vendor.js:43150:38)
at _updateRegionalSettings(file:///data/data/org.blah/files/app/vendor.js:43177:14)
at initNativeView(file:///data/data/org.blah/files/app/vendor.js:43154:14)

Thanks,

Michael

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ DatePickerField với các giá trị Date được hiển thị và binding v-model, sau đó truy vết việc xử lý ngày tháng của DatePickerField phía sau các stack frame formatDateTime và getFormattedDate. Được xem là hoàn tất khi ví dụ không còn gây ra lỗi getTime và v-model hoạt động với kiểu giá trị ngày tháng được ghi trong tài liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
mobile-dev
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.