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

min-date and max-date issue #164

Open
vamsideepak opened this issue Jul 14, 2017 · 6 comments
Open

min-date and max-date issue #164

vamsideepak opened this issue Jul 14, 2017 · 6 comments

Comments

@vamsideepak
Copy link

in min-date and max-date angularjs $scope variable's values are not accessing(even javascript variable too) . please help me in this if any one know it.

@oscar09
Copy link
Collaborator

oscar09 commented Jul 20, 2017

can you elaborate what the problem is or provide a plunker with the error?

@vamsideepak
Copy link
Author

Hai oscar09 first of all thank u for responding.
i just need to access controller scope value in mindate and maxdate. but in this sm date tie picker we are not accessing that .

@oscar09
Copy link
Collaborator

oscar09 commented Jul 21, 2017

Do you want to access the mindate & maxdate with the controller to make it dynamic? If so, I believe that will fall into the "new feature" category. Currently mindate & maxdate values are set at initialization and cannot be changed after that.

@vamsideepak
Copy link
Author

thank u bro . do you know how to set custom range only in range picker remaining has to be disappear (i mean today, last 7 days, last month etc...). i done this by commenting the code today, last 7 days..etc. but that's not a good level. is there any attribute to show only custom range start and end dates.

@oscar09
Copy link
Collaborator

oscar09 commented Jul 22, 2017

As I understand, you want to modify the default set of date ranges (today, last 7 days, this month, etc). If that is the case, you can do it with the custom-list attrubute. It will look something like this:

<sm-range-picker-input
	            fname="Date of Paya"
	            label="Date of Paya"
	            form="test"
	            ng-model="vm.employee.default1dd"
	            flex="50"
				format="DD-MM-YYYY"
	            divider="To"
	            week-start-day="Monday"
	            custom-list="vm.overrideList"
	            custom-to-home="true">
	        </sm-range-picker-input>

in your controller:

vm.overrideList = [{
        position:1,
        label:'Custom',
        startDate: moment(),
        endDate: moment()
    }]

However, It seems to be broken. I will work on a fix and upload it during the weekend.

@vamsideepak
Copy link
Author

thank you mr.oscar09 i will try now .

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

2 participants