SetTitle of Data Picker instead of getting Today Date in Xamarin Forms - xamarin

I had a datepicker in which I am getting default system date during its Initialization.But I don't want default date.I need to get a Title(Select Date) similar to PikcerTitle in Xamarin.Forms. Anyone please help me to bring a solution for my problem.Thanks in advance.

You can add a label and datepicker instead of just datepicker and hide datepicker. Add a tap gesture to the label, on the tap focus the datepicker and bind the text of the label to the datepicker's date.
On page load add your desired text in the label.

Related

Default year view on v-date-picker

On v-date-picker, when clicking on the input field I want the date dialog to default to the year view (please see pic below). Which Vuetify's property I can use? Or a code sample that I can add on the mounted() section.
Got the solution on the Docs under the "Date pickers - birthday picker" example.
https://v1.vuetifyjs.com/en/components/date-pickers

Windows Phone Date Picker Submit event

I have a native Date Picker in a windows phone app.
Using the DateChanged event I can perform actions when the user submits.
DatePicker.DateChanged += (o, args) =>
{
var date = args.NewDate;
// Do something with it
}
The problem I am facing is the event is not triggered if the user submits the date picker without changing the date.
Default value is set to today's date which makes it impossible to select this date.
Does anyone know how I can allow the user the select this date and perform actions after ?
Thanks for your help :)
There is no particular way of getting an event fired when the date is not changed. As you said the date picker by default selects the current date, you can perform the action you want to if the user selects today's date in the OnNavigatedTo, Loaded, or DatePicker_Loaded event. A better way to do so is providing the DatePicker an invalid date something like 1Jan1947, this ways the user has to change the date else it'll be invalid. Also if you write the code you want on dateChanged event, it'll fire automatically as when the DatePicker is Loaded it sets the date from default to the current date.
What I would recommend
is to use a binding property to hold a value and then performing the
operations onPropertyChanged event of that property. This ways your
logic is independent of your datePicker and you could write events
for each time the dateTime property changes.
Do remember to bind the datePicker's date property to the DateTime
property in a TwoWay Mode and an UpdateSourceTrigger of
PropertyChanged. This ways when you change the property from code
behind the data would reflect in the datePicker and when you change
the value in the datePicker, the data would be reflected in the code
behind as well

Kendo grid column/filter menu disappears after using datepicker

In my Kendo grid I have a data set that includes a date. The date is filterable and includes the built-in date picker.
When you click the date picker and subsequently pick at date from the calendar pop-up, the cursor is inevitably below the original column pop-up menu that shows the date-picker icon and input field.
Therefore, the pop-up disappears before you can submit the filter query and requires you to go back into the column menu, select filter, where you will see the date that was previously chosen.
Then you can press submit and it will filter on the date.
This behavior is quite annoying and I was wondering how I could keep the original column menu pop-up displayed so the user can then click submit. As it stands, the only way to do this is to very quickly move the mouse back up into the original pop-up after clicking on a date!
I am having the exact same issue. All standard settings as OP mentioned.
Edit: **** SOLUTION ****
kendogrid filter menu closing on mouseleave

How to trigger native datepickers from javascript in FirefoxOS?

I want to open the native datepicker of FirefoxOS on a click on a button.
By default, the native datepicker shows up when an input (date type obviously) has focus.
But how to do this with for a button ? Moreover, I don't like date inputs, because my app is in french and the format of the date displayed in a date input is not the french format.
I tested with a date input hidden with css. The click on the button triggers the focus on the input. But in this case the datepicker is not shown.
Please do not suggest me to use JQuery UI or other javascript datepickers. On mobile they are not very usuable and the best is native datepicker.
Thanks for your help
Firstly, if your question is about how to fire the native date picker with a button, you can do it by calling focus on it like:
<input id="datepicker" type="date">
<button onclick="document.getElementById('datepicker').focus()"></button>
If it's about hiding the date picker, but still using it with the button, you can put the opacity to 0 with CSS, but it will still be there, just not visible:
#datepicker {
opacity: 0;
}
Does that answer your question?

Manual input date in Kendo Grid DatePicker not working

I'm facing a problem that I can't understand. I'm using Kendo Grid with InCell edit and I have a DateTime field in my Model.
When the grid enters in edit mode, the calendar is shown, but the grid only saves the inputed value if I select the value from the calendar. If I input the field manually, the value is not saved and the cell is not marked has dirty.
If it helps, I'm using MVC with Razor sintax.
Tks in advance!
I've found a workaround in Kendo's forums:
By design, the DatePicker does not raise the change event when the value is set programmatically - it raises only if the date is modified by the end-user. In case you need to trigger the change event, you can use jQuery trigger().
For example:
var datePicker = $("#datepicker").data("kendoDatePicker");
datePicker.value("01/01/2001");
datePicker.trigger("change");
Reference:
http://www.kendoui.com/forums/ui/date-time-pickers/datepicker-change-event.aspx
So basically what I did was to force the change event manually.

Resources