robertlowe / autoform-pickadate Goto Github PK
View Code? Open in Web Editor NEWPickadate for Autoform
License: Other
Pickadate for Autoform
License: Other
We are developing an application primarily for non-english speakers. How can we translate the date strings, such as month names, into other languages?
Hi,
I am trying to pass a default date value on a pickadate input field so user can choose a date in calendar and when they got redirected to add/edit event, his/her selected date will be the default. However, it always defaults to current date, even if I pass the helper tag which results to date selected by user.
Here are my code snippets:
client/templates/events.html
{{eventStartDate}}
{{> afQuickField name='from_date' value=eventStartDate template="bootstrap3-horizontal" label-class="col-sm-3" input-col-class="col-sm-9"}}
client/templates/events.js
Template.Events.helpers({
eventStartDate: function () {
return Session.get('eventStartDate');
}
});
collections/libs/events.js
Events = new Mongo.Collection("events");
Events.attachSchema(new SimpleSchema({
from_date: {
type: Date,
label: 'From Date',
autoform: {
type: "pickadate",
afFieldInput: {
pickadateOptions: {
format: 'dddd, d mmmm, yyyy',
formatSubmit: 'yyyy-mm-dd'
}
}
}
}
});
Here is the output (I displayed the eventStartDate before the autoform quick field to show that the helper function is working correctly when displayed as-is, but when passed in pickadate field, is overriden by current date):
Thanks for your help! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.