want to disable keyboard in ionic app when click on calendar field - ionic-framework

I'm using for my ionic app.
Everything working fine. When I choose calendar for Date field its displaying keyboard in mobile app.
I want to disable that keyboard when click on calendar input field.
I tried this...
<p-calendar showTime="showTime" id="someThing" placeholder="Start Date & Time" hourFormat="24" [minDate]="minDate"
[defaultDate]="minDate" (click)="onPickDate()" formControlName="pick_up_datetime" [touchUI]="true" [showIcon]="true" (ionFocus)="keyboard_show()">
and ts file like below
import {Keyboard} from '#ionic-native/keyboard';
constructor(private keyboard: Keyboard) {
}
keyboard_show(){
this.keyboard.hide();
}
but its not working.

After some research, I found working solution,
In <p-calendar></p-calendar> there is a default directive called [readonlyInput]="true", add this into p-calendar like this..
<p-calendar [showTime]="true" formControlName="pick_up_datetime" [touchUI]="true" [showIcon]="true" [readonlyInput]="true"></p-calendar>
It will work.

Related

Xcode Swift 5 MacOs app empty window when archived but works when running it from Xcode

I am building an app for Mac which logs into a website based on login and password collected from textfield and secure text field, then app opens an url which is created in my app based on date range selection with use of two date picker cell calendars. Next app displays html data in webWiev (using WKWebView), converts html to string using extension NSAttributedString and then saves retrieved data as txt file. Everything works as expected as long as app is run from Xcode "play" button. Problem is if I archive this app and launch it, it will bring up an empty window without any button, calendar or textfield. There are no errors, no crash logs on organizer, nothing.
I decided to perform a little test. I build another view controller with only one button which upon clicking will show my app main view controller. After archiving this modified app and running it outside of Xcode a window shows view controller with one button which is correct. But after clicking it nothing happens. App works great if running "inside" Xcode, a pushbutton shows main ViewController correctly. Do You have any clue what can be wrong? thank You!
Edit 1. So I found a discussion on apple which mention this problem. It is associated with IB WKWebView and problem is already known since some time. Now I have to get around the problem. Apple forum link: https://forums.developer.apple.com/thread/116047
Did you embed WebKit.framework to your app?
After comment that I wrote, I founded a solution and solved with this method.
Please check it out.

ng datepicker displays calender incorrectly saturday let empty

I am using ng datepicker to pick date in my application. Below code displays correct calendar in chrome but not in IE and firefox. Please view the below image and pour in your experiences and suggestions. Currently our customer is live and this is causing major issues.
<ng-datepicker formControlName="Date"></ng-datepicker>
Moved from ng-datepicker to material datepicker to fix this issue.

cordova-plugin-smooch issues with iOS/Android app built using creator.ionic.io

Am using http://creator.ionic.io to create a hybrid iOS/Android app.
Have added cordova-plugin-smooch as a plugin in Code Settings.
Have added ionic-native.min.js.
Have added smoochio.js with following code...
Smooch.init({
"appToken": "MY-TOKEN",
"soundNotificationEnabled": "true",
"imageUploadEnabled": "true",
});
The smooch.io button appears in the app but I think it's not 'native' because when user tries to type in message field, the iOS keyboard goes on top of the message input field so user can't see what they are typing. Also, in the smooch.io message window header, the 'X' or close icon doesn't show up...
Not sure what I'm missing to activate the 'native' plugin so it functions correctly on the phone. Thanks for any help.

UWP - How to show TimePicker / DatePicker in Open format on Page Load

I am developing UWP (Win10 - VS2015) app. when the app runs, the timepicker/datepicker is always in this format, See Img (1), and when we tap on the img(1) control then it shows/popup the img(2) flyout, but I need to show the full page flyout mode (like img(2)) on Page Load, rather than tap on the img(1).
I checked the Style and Template of Timepicker but didn't find anything. Plz help.
OR how can we get the custom timepicker control same like the iPad one.
See the img Link here
As a workaround i found below solution. Hope it helps.
Attach TimePickerFlyout to TimePicker.It has got Placement property. There you can specify Full mode.
<TimePicker x:Name="TestTimePicker" ClockIdentifier="24HourClock" Time="0" >
<FlyoutBase.AttachedFlyout>
<TimePickerFlyout Placement="Full" TimePicked="TimePickerFlyout_TimePicked"/>
</FlyoutBase.AttachedFlyout>
</TimePicker>
On page load showthe flyout. DOnt forget to call UpdateLayout of page or else Flyout wont be closed when you tap on Accept button.
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
FlyoutBase.ShowAttachedFlyout(TestTimePicker);
UpdateLayout();
}
In TimePicked event assign selected time to TimePicker
private void TimePickerFlyout_TimePicked(TimePickerFlyout sender, TimePickedEventArgs args)
{
TestTimePicker.Time = sender.Time;
}
Here is the screenshoot. If you want to increase the width and height you can edit the style of TimePickerFlyoutPresenter
You can also use TimePicker from Syncfusion
Or you can try to edit style for standart UWP TimePicker. It's located in file generic.xaml which should be inside folder like
C:\Program Files\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.10240.0\Generic
You can serch for TimePicker or TimePickerFlyoutPresenter

How can i enable selecting a date from Calendar View Date Picker in iPhone SDK?

I am trying to do simle app and i need to enable selecting a date from Calendar View Date Picker. Does iPhone SDK has such UI Controller ?
thanks.
It has the UIDatePicker:
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIDatePicker_Class/Reference/UIDatePicker.html
Which looks like this:
http://www.llamagraphics.com/files/imagecache/full_width_one_sidebar/inline-images/better.png