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

Implement public API getter methods for start and end dates #463

Open
TrueBurn opened this issue Oct 31, 2018 · 3 comments
Open

Implement public API getter methods for start and end dates #463

TrueBurn opened this issue Oct 31, 2018 · 3 comments
Labels
Category: help wanted Good issue for beginners. Status: todo Accepted issue that needs someone to fix it. Type: enhancement Feature request or other QoL improvements.

Comments

@TrueBurn
Copy link

I just upgraded to the newest version and the get API functions are no missing

data: function (params) {
params.StartDate = moment($('#reportrange').data('dateRangePicker').getStart()).format("YYYY-MM-DD HH:mm");
params.EndDate = moment($('#reportrange').data('dateRangePicker').getEnd()).format("YYYY-MM-DD HH:mm"); //$("#reportrange").data('daterangepicker').endDate.format('DDMMMYYYY');
}

Can these be re-added to please advise how to access the start and end dates without having to decode the dom element value

@monovertex
Copy link
Collaborator

Hello, @TrueBurn. What version did you update from? I just checked some older tags (v10 and v5) and it seems the plugin never had those API methods. Perhaps the file you had in your project was modified directly and when you upgraded you lost those changes?

As far as I know, the only method to get the value right now is the input value, as that's the purpose of this plugin. I'll transform this issue into a feature request for date getters if you confirm that those changes were custom updates on the plugin.

@monovertex monovertex added Type: question Question regarding the usage of the plugin, its API, or other general inquiries. Status: answered Answered question, can be closed. Status: needs submitter response There's additional information to properly assess this issue. labels Nov 1, 2018
@TrueBurn
Copy link
Author

TrueBurn commented Nov 1, 2018

Hi @monovertex . I think I did have a custom extension now that I look at my version history.

It was a very basic method:

.call(this), p.alwaysOpen && t(0), Z(this).data("dateRangePicker", { setStart: function(e) { return "string" == typeof e && (e = Q(e, p.format).toDate()), p.end = !1, C(e), this }, getStart: function() { return p.start; }, setEnd: function(e, t) { var a = new Date; return a.setTime(p.start), "string" == typeof e && (e = Q(e, p.format).toDate()), T(a, e, t), this }, getEnd: function() { return p.end; },

So this is indeed not an issue.

@monovertex
Copy link
Collaborator

Alright. I'll convert this to a feature request issue and we'll add these in the future.

@monovertex monovertex changed the title get functions missing Implement public API getter methods for start and end dates Nov 1, 2018
@monovertex monovertex added Type: enhancement Feature request or other QoL improvements. Status: todo Accepted issue that needs someone to fix it. Category: help wanted Good issue for beginners. and removed Status: answered Answered question, can be closed. Status: needs submitter response There's additional information to properly assess this issue. Type: question Question regarding the usage of the plugin, its API, or other general inquiries. labels Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: help wanted Good issue for beginners. Status: todo Accepted issue that needs someone to fix it. Type: enhancement Feature request or other QoL improvements.
Projects
None yet
Development

No branches or pull requests

2 participants