MinDate and MaxDate are not working for the native date picker in Ionic 4start Date should currentDate in Ionic2 dateTimeIonic Native Date Picker not working on AndroidIonic Time and Date PickerIonic 4 native plugin not workingIon date picker is not working for date selector in ionic 4Ionic Native HTTP client (@ionic-native/http) not working when importingAdd default date to ionic-datetime - ionic 4 angular projectionic 4 flashlight native plugin not workingHow to convert the date in Ionic date picker to 'Y-m-d H:i:s' In Ionic 4Not able to set the image using the Image Picker In Ionic 4
What makes Ada the language of choice for the ISS's safety-critical systems?
How to handle self harm scars on the arm in work environment?
is it possible for a vehicle to be manufactured witout a catalitic converter
Giant Steps - Coltrane and Slonimsky
Active low-pass filters --- good to what frequencies?
How to safely destroy (a large quantity of) valid checks?
How to trick the reader into thinking they're following a redshirt instead of the protagonist?
How come the nude protesters were not arrested?
Is this use of the expression "long past" correct?
How does an ordinary object become radioactive?
I have a problem assistant manager, but I can't fire him
How to communicate to my GM that not being allowed to use stealth isn't fun for me?
How is water heavier than petrol, even though its molecular weight is less than petrol?
Soft question: Examples where lack of mathematical rigour cause security breaches?
Does the Long March-11 increase its thrust after clearing the launch tower?
Pre-1972 sci-fi short story or novel: alien(?) tunnel where people try new moves and get destroyed if they're not the correct ones
Overlapping String-Blocks
What speaks against investing in precious metals?
Fixing obscure 8080 emulator bug?
Winning Strategy for the Magician and his Apprentice
How can I make some of my chapters "come to life"?
Can Rydberg constant be in joules?
Using "subway" as name for London Underground?
Why do some employees fill out a W-4 and some don't?
MinDate and MaxDate are not working for the native date picker in Ionic 4
start Date should currentDate in Ionic2 dateTimeIonic Native Date Picker not working on AndroidIonic Time and Date PickerIonic 4 native plugin not workingIon date picker is not working for date selector in ionic 4Ionic Native HTTP client (@ionic-native/http) not working when importingAdd default date to ionic-datetime - ionic 4 angular projectionic 4 flashlight native plugin not workingHow to convert the date in Ionic date picker to 'Y-m-d H:i:s' In Ionic 4Not able to set the image using the Image Picker In Ionic 4
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am working in my Ionic 4 project and I have used the native date picker plugin. It is working fine but I am not able to set the min and max date in it for the Android.
This is my tab2.page.html:
<ion-input formControlName="startchallenge" placeholder="Select Date" (click)="datePickershow()" [readonly]=true></ion-input>
This is my tab2.page.ts:
datePickershow()
this.datePicker.show(
date: new Date(),
mode: 'date',
androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK,
minDate: new Date().toISOString(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).toISOString(),
).then(
date => console.log('Got date: ', date),
err =>
console.log('Error occurred while getting date: ', err)
);
}
I have used min and max date in Android after that the user is able to select the back date from today because I have used the min date as a today date but the problem is that user is able to select the previous date in Android.
Any help is much appreciated.
ionic-framework ionic4
add a comment |
I am working in my Ionic 4 project and I have used the native date picker plugin. It is working fine but I am not able to set the min and max date in it for the Android.
This is my tab2.page.html:
<ion-input formControlName="startchallenge" placeholder="Select Date" (click)="datePickershow()" [readonly]=true></ion-input>
This is my tab2.page.ts:
datePickershow()
this.datePicker.show(
date: new Date(),
mode: 'date',
androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK,
minDate: new Date().toISOString(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).toISOString(),
).then(
date => console.log('Got date: ', date),
err =>
console.log('Error occurred while getting date: ', err)
);
}
I have used min and max date in Android after that the user is able to select the back date from today because I have used the min date as a today date but the problem is that user is able to select the previous date in Android.
Any help is much appreciated.
ionic-framework ionic4
add a comment |
I am working in my Ionic 4 project and I have used the native date picker plugin. It is working fine but I am not able to set the min and max date in it for the Android.
This is my tab2.page.html:
<ion-input formControlName="startchallenge" placeholder="Select Date" (click)="datePickershow()" [readonly]=true></ion-input>
This is my tab2.page.ts:
datePickershow()
this.datePicker.show(
date: new Date(),
mode: 'date',
androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK,
minDate: new Date().toISOString(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).toISOString(),
).then(
date => console.log('Got date: ', date),
err =>
console.log('Error occurred while getting date: ', err)
);
}
I have used min and max date in Android after that the user is able to select the back date from today because I have used the min date as a today date but the problem is that user is able to select the previous date in Android.
Any help is much appreciated.
ionic-framework ionic4
I am working in my Ionic 4 project and I have used the native date picker plugin. It is working fine but I am not able to set the min and max date in it for the Android.
This is my tab2.page.html:
<ion-input formControlName="startchallenge" placeholder="Select Date" (click)="datePickershow()" [readonly]=true></ion-input>
This is my tab2.page.ts:
datePickershow()
this.datePicker.show(
date: new Date(),
mode: 'date',
androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK,
minDate: new Date().toISOString(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).toISOString(),
).then(
date => console.log('Got date: ', date),
err =>
console.log('Error occurred while getting date: ', err)
);
}
I have used min and max date in Android after that the user is able to select the back date from today because I have used the min date as a today date but the problem is that user is able to select the previous date in Android.
Any help is much appreciated.
ionic-framework ionic4
ionic-framework ionic4
edited Apr 2 at 17:50
Raghav
asked Mar 20 at 9:35
RaghavRaghav
5482325
5482325
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Try This:
minDate: new Date().valueOf(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).valueOf(),
This will solve your problem.
add a comment |
I think you should use ion-datetime, which provide easiest way to getting date or time from user.
There are lots of methods to formate date and time input.
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
|
show 7 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55257583%2fmindate-and-maxdate-are-not-working-for-the-native-date-picker-in-ionic-4%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try This:
minDate: new Date().valueOf(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).valueOf(),
This will solve your problem.
add a comment |
Try This:
minDate: new Date().valueOf(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).valueOf(),
This will solve your problem.
add a comment |
Try This:
minDate: new Date().valueOf(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).valueOf(),
This will solve your problem.
Try This:
minDate: new Date().valueOf(),
maxDate: new Date(new Date().setDate(new Date().getDate() + 10)).valueOf(),
This will solve your problem.
answered Apr 2 at 10:55
RaghavRaghav
5482325
5482325
add a comment |
add a comment |
I think you should use ion-datetime, which provide easiest way to getting date or time from user.
There are lots of methods to formate date and time input.
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
|
show 7 more comments
I think you should use ion-datetime, which provide easiest way to getting date or time from user.
There are lots of methods to formate date and time input.
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
|
show 7 more comments
I think you should use ion-datetime, which provide easiest way to getting date or time from user.
There are lots of methods to formate date and time input.
I think you should use ion-datetime, which provide easiest way to getting date or time from user.
There are lots of methods to formate date and time input.
answered Mar 25 at 6:48
Kishan BhardaKishan Bharda
139113
139113
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
|
show 7 more comments
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
I was using that but my client doesn't like the UI so I changed to this.
– Raghav
Mar 25 at 6:51
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
In this, Can you please help me?
– Raghav
Mar 25 at 6:52
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Sorry @Raghav, I have no idea how to change the UI.
– Kishan Bharda
Mar 25 at 7:01
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Okay. but Can you help me in this question?
– Raghav
Mar 25 at 7:04
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
Which type of help you need ? I will sure help you, if i am able to.
– Kishan Bharda
Mar 25 at 7:12
|
show 7 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55257583%2fmindate-and-maxdate-are-not-working-for-the-native-date-picker-in-ionic-4%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown