Skip to content
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

Date range picker usage #1

Open
Ajaxsoap opened this issue Sep 20, 2015 · 0 comments
Open

Date range picker usage #1

Ajaxsoap opened this issue Sep 20, 2015 · 0 comments

Comments

@Ajaxsoap
Copy link

Hi @baysao ,

Thanks for this package!

I've tried it and it works perfect, statically but how do the date range react with my data on the table dynamically?

Here's my schema:

DateRangeSchema = new SimpleSchema({
  dateRange: {
    type: [Date],
    label: "Date Range:",
    optional: true,
    autoform: {
      type: "bootstrap-daterangepicker",
      dateRangePickerValue: moment().add(1, 'days').format("DD/MM/YYYY") + " - " + moment().add(3, 'days').format("DD/MM/YYYY"),
      dateRangePickerOptions: {
        dateLimit: { days: 31 },
        minDate: moment().add(-150, 'days'),
        maxDate:moment().add(12, 'months'),
        startDate: moment().add(1, 'days'),
        endDate: moment().add(31, 'days'),
        timePicker: false,
        format: 'DD/MM/YYYY',
        timePickerIncrement: 30,
        timePicker12Hour: false,
        timePickerSeconds: false
      }
    }
  },
});

I know that I have to create a sever method for the date range to react with my data and pass it on autoform but I don't know how to do this?

Is it possible to set the reference date field (Date object) as a startDate? I can see that the normal usage for date range is something like createdAt:startDate.

I have effectivity date on my schema and I want my user to filter the date range based on this context. Is this possible?

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant