GithubHelp home page GithubHelp logo

autoform-pickadate's People

Contributors

arvi avatar robertlowe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autoform-pickadate's Issues

Date translations (e.g. month names)?

We are developing an application primarily for non-english speakers. How can we translate the date strings, such as month names, into other languages?

Passing date value defaults to current date

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):

screen shot 2015-03-10 at 10 20 56 am - events

Thanks for your help! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.