ionic4-date-picker icon indicating copy to clipboard operation
ionic4-date-picker copied to clipboard

Set Maximum date is not working

Open MalikRizwanAwan opened this issue 6 years ago • 5 comments

i want maximum date should be 31/December/2018. user should not be able to set above then this. unfortunatelly its not working i use fromdate and to date as mentioned in page. please help me how could i resolve this. and this other thing is my demand is that i also want a back button on calendar header could this possible

MalikRizwanAwan avatar Oct 18 '19 06:10 MalikRizwanAwan

Hi @MalikRizwanAwan, Did you provide fromDate and toDate as JavaScript date objects?

For example in your case:

toDate = new Date(2018, 11, 31);

Thanks!

write2sv avatar Oct 19 '19 10:10 write2sv

this.dateSelected = new Date(1546228200 * 1000);

this.dateLoaded = moment().toDate(); this.calendarStart = moment() .subtract(50, 'years') .toDate(); this.getResults(this.dateSelected);

On Sat, Oct 19, 2019 at 3:48 PM write2sv [email protected] wrote:

Hi @MalikRizwanAwan https://github.com/MalikRizwanAwan, Did you provide fromDate and toDate as JavaScript date objects?

For example in your case:

toDate = new Date(2018, 11, 31);

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/write2sv/ionic4-date-picker/issues/7?email_source=notifications&email_token=AIM6NGD2YUZITJDA4ZXOYG3QPLQWXA5CNFSM4JCDJPTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBXLSPQ#issuecomment-544127294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIM6NGCFRZZZCQK6PSONKXDQPLQWXANCNFSM4JCDJPTA .

MalikRizwanAwan avatar Oct 22 '19 06:10 MalikRizwanAwan

its on run time showing 31/dec/2018 but user is able to select 2019 dates as well

On Tue, Oct 22, 2019 at 11:05 AM Rizwan Awan [email protected] wrote:

this.dateSelected = new Date(1546228200 * 1000);

this.dateLoaded = moment().toDate(); this.calendarStart = moment() .subtract(50, 'years') .toDate(); this.getResults(this.dateSelected);

On Sat, Oct 19, 2019 at 3:48 PM write2sv [email protected] wrote:

Hi @MalikRizwanAwan https://github.com/MalikRizwanAwan, Did you provide fromDate and toDate as JavaScript date objects?

For example in your case:

toDate = new Date(2018, 11, 31);

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/write2sv/ionic4-date-picker/issues/7?email_source=notifications&email_token=AIM6NGD2YUZITJDA4ZXOYG3QPLQWXA5CNFSM4JCDJPTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBXLSPQ#issuecomment-544127294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIM6NGCFRZZZCQK6PSONKXDQPLQWXANCNFSM4JCDJPTA .

MalikRizwanAwan avatar Oct 22 '19 06:10 MalikRizwanAwan

and the other thing which i use back button above you see i also want to set it into calendar header

MalikRizwanAwan avatar Oct 23 '19 07:10 MalikRizwanAwan