Ion date time ‘Ok’ and ‘Done’ buttons not display properly - ionic-framework

I wanna implement ionic date time (https://ionicframework.com/docs/api/components/datetime/DateTime/)
to my project.
date time problem here are
But ı cannot see date time buttons. I don't understand what the actual problem is.
This is output of ionic info command.
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.9.2
System:
Node : v6.10.2
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.2.1 Build version 8C1002
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy

You can do this:
<ion-datetime displayFormat="hh:mm a" [(ngModel)]="myDate"></ion-datetime>
It will give time with format.
I hope it will help you.

Related

No resource found that matches the given name (at 'networkSecurityConfig' with value '#xml/network_security_config')

I'm beginner developer in ionic.
I tried to "ionic cordova run android --device" command to run app on my phone.
fell into error below ('sample' is my project.)
:processDebugResources
/Users/xxx/sample/platforms/android/res/xml/config.xml:33:53-81: AAPT: No resource found that matches the given name (at 'networkSecurityConfig' with value '#xml/network_security_config').
/Users/xxx/sample/platforms/android/build/intermediates/res/merged/debug/xml/config.xml:33: error: Error: No resource found that matches the given name (at 'networkSecurityConfig' with value '#xml/network_security_config').
so, I did below action.
edit config.xml file to set real AndroidManifest.xml location.
(app/src/main/AndroidManifest.xml -> AndroidManfest.xml)
(before)
enter image description here
(after)
enter image description here
in my AndoridManifest.xml set minSdkVersion="16" and targetSdkVersion="26".
Any help would be appreciated. :)
PS) ionic info is...
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.2.4
Cordova Platforms : android 6.3.0 ios 4.5.5
Ionic Framework : ionic-angular 3.9.9
System:
Node : v6.11.3
npm : 3.10.10
OS : macOS
Xcode : Xcode 12.4 Build version 12D4e
it solved by edit config.xml file like this:
target="app/src/main/res/xml/network_security_config.xml" -> target="res/xml/network_security_config.xml"

Ionic live-reload executes twice on save

Every time I make a change to my code, live-reload executes twice. The first reload is quick (< 1 second), then there is a pause, then another reload fires and takes substantially longer (2 - 3 seconds).
When I create a fresh Ionic starter app, I don't get this problem. I have tried different IDEs and get the same result.
My ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0
Ionic Framework : ionic-angular 3.9.5
#ionic/app-scripts : 3.2.2
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
System:
Android SDK Tools : 26.1.1 (/Users/alexandrsteinberg/Library/Android/sdk)
ios-deploy : 2.0.0
NodeJS : v8.12.0 (/Users/alexandrsteinberg/.nvm/versions/node/v8.12.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001

Ionic serve taking too much time like 4 to 6 minutes while compiling ionic 3 project

I am using ionic-3 and when I am compiling ionic project through ionic serve command, Its taking 4-6 mins for me.
Versions of following components:
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
#ionic/app-scripts : 2.1.4
Cordova Platforms : android 7.1.0
Ionic Framework : ionic-angular 3.7.1
System:
Android SDK Tools : 26.1.1
Node : v7.10.1
npm : 5.4.2
OS : Linux 4.4
Environment Variables:
ANDROID_HOME : /home/spaneos/Android/Sdk
Misc:
backend : pro
node version: 7.10.0
npm version: 5.4.2
It depends on your system specification. If you have a higher config machine then it will take less time. I hope you got the point.

Without `from` option PostCSS could generate wrong source map or do not find Browserslist config

Witout from option PostCSS could generate wrong source map or do not
find Browserslist config. Set it to CSS file path or to undefined to
prevent this warning
ionic3 project, when I running ionic corodva bulid ios --prod showing this warning for me.
ionic info
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.1.7
Cordova Platforms : android 6.3.0 ios 4.4.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v6.11.3
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
UPDATE:
I tried to update my npm to 5.5.1 and node to 8.6.0, but still showing.
Finally, this warning solved. Thanks to Suraj Rao
First find sass.js file under /node_modules/#ionic/app-scripts/dist/sass.js.
inside search var postcssOptions and add from: undefined,
Finally should be like this:
var postcssOptions = {
from: undefined,
to: path_1.basename(sassConfig.outFile),
map: autoPrefixerMapOptions
};
Reference: workaround.
For whoever directly used PostCSS and met this issue then came here,
Change your
postcss( any_plugins ).process( css )
to
postcss( any_plugins ).process( css, { from: undefined } )
can fix the issue.
For me, adding map: { inline: false } solved my problem.

I am getting Runtime Error when I update ionic2 project to ionic3 ?

Runtime Error
Module build failed: Error: ENOENT: no such file or directory, open '/Users/.../src/constants/Strings.js.map' at Error (native)
typescript": "2.3.4"
Ionic info
global packages:
#ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
#ionic/app-scripts : 1.3.7
#ionic/cli-plugin-cordova : 1.4.0
#ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.4.2
System:
Node : v6.10.3
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
ios-deploy : 1.9.1
ios-sim : 5.0.13
npm : 5.0.3
reading this post on the official ionic blog it seems like it could be some import that are unmatched because capital letters.
Give it a try, hope this helps you to solve your problem.