-
-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TimePanel error with moment format and type datetime #377
Comments
Thanks for feedback. <date-picker
v-model="value4"
:format="momentForamt"
:show-hour="true"
:show-minute="true"
:show-second="true"
type="datetime"
placeholder="Select datetime"
></date-picker> |
Thanks a lot for the quick reply, I'll try your solution. <DatePicker
v-model="date"
input-class="form-control"
valueType="YYYY-MM-DDTHH:mm:ss"
type="datetime"
:format="dpFormat"
></DatePicker>` import DatePicker from "vue2-datepicker";
export default Vue.extend({
name: "home",
components: {
DatePicker
},
data() {
return {
dpFormat: `${moment.localeData().longDateFormat('L')} ${moment.localeData().longDateFormat('LT')}`
};
}
}); |
fixed in v3.1.1 |
Vue2-datepicker version: 3.0.2
Vue version: 2.6.10
Browser: all
DatePicker set with both type="datetime" and custom moment format raises the following error after selecting date and before opening TimePanel:
[Vue warn]: Invalid prop: type check failed for prop "format". Expected String with value "[object Object]", got Object
I don't get any errors when using format and type="date"
The text was updated successfully, but these errors were encountered: