Primefaces DatePicker Range Selection with Time - primefaces

We use a DatePicker component in our project. Primefes Version 10.
<p:datePicker id="range" selectionMode="range" showTime="true" />
Period selection works great:
The selected period will be deleted when I change the time.
Is it possible to use Date Range Picker with a Time?

Currently that is not available but has been requested on GitHub. I suggest you go upvote the issue there.
See Issue: https://github.com/primefaces/primefaces/issues/5037

Related

Yii2 full calendar custom button?

I'm trying to add a custom button into yii2 full calendar, but doesn't work for me.
Basically, I want to include a button as part of the full calendar view, i.e., next to the month and date. This button should be to the left of the calendar header.
I'm using customButton from Full Calendar, but this doesn't work.
Thanks for any help.
Support for customButtons is supported in version 2.4.0. Make sure you're using this version or higher.

How to turn off the time selection in the bootstrap datepicker?

I've embed a bootstrap datepicker from http://www.malot.fr/bootstrap-datetimepicker/demo.php
I want only the date and month and year to be displayed. But in this plugin I've date,month,year, and time. How do I remove only the time selection from this datepicker?
Use DatePicker instead of DateTimePicker.
I use a different datetime picker, and have had great success with it. Bootstrap 3 Date/Time Picker. It uses Moment.js and allows for all sorts of date/time formatting options. It is also more accessible, and allows for scrolling through the calendar and time option using a keyboard.
Using the plugin I suggested, the format for just the date would be:
$('.formDate').datetimepicker({
format: 'MM/DD/YYYY'
});

BB10 input[type=date] and datepicker

I'm working on bug requests for an jQuery Mobile/HTML5 app on Blackberry 10. One of the bugs reported only seems to manifest on the BB10. The bug report is that the datepicker sometimes doesn't show up when the date field (input type=date) is tapped.
After experimenting with this for a while, it appears that, on the BB10, the date picker isn't triggered by the date field having focus, but rather by the the user 'tapping' the field -- and that tap seems to have a bit of time sensitivity.
As an example: if I use jQuery Mobile's "clear button", like so:
<input type="date" name="my-field" value="" data-clear-btn="true" autocorrect="off"
autocapitalize="off" />
I can easily create a scenario where I provide a date and then hit the clear button. The net result is that the date field has focus, but the date picker doesn't automatically appear. Once the form state is like this, it's pretty easy to get the problematic behaviour -- tap and nothing happens.
As I said, above, there seems to be a bit of time sensitivity to the tapping. When trying to give that field focus, some people seem to tap fairly quickly -- jQuery seems to notice the tap and does its magic to apply the "ui-focus" style, but it's still seems to be too quick to get the date picker to intervene. So far, every time I've held my finger down for a full second, I've always had the date picker pop up, but my usual tapping speed is a bit too fast to trigger the date picker (and the QA people certainly seem to have tripped on this a number of times).
My question, then, is: Is there anything I can do about this? Is there an event I can fire on focus that'll trigger the datepicker? Or some kind of configuration I can fiddle with?
I fear that the answer is probably "no" but I wanted to ask.

HTML Input Type Date - Select and Collapse

When using an input type date in HTML5, after the user clicks on a date, the calendar stays expanded forcing them to click away from the calendar to make it collapse. I'd like for this to happen in a single click (i.e. when they click on the calendar, the date is recorded, the calendar collapses and they can get on to other business). Can anyone tell me how to do this? Thanks!
<label>Date</label>
<input type="date" id="my_date">
You could do it by using a jQuery plugin such as datepicker from jQuery UI:
http://jqueryui.com/datepicker/
You could also use webshims, which polyfills incapable browsers and gives you nice custom widgets on top of HTML5 form inputs. Here is a demo, which includes some examples with different configurations.
webshims.polyfill('forms forms-ext');

Android time and date picker in one (iOS equivalent)

I am building an HTML5 coded app that will be wrapped for both android and iPhone.
I have a button that should evoke the date/time picker. On iOS this is easy as the picker already exists in one
Android has date and time picker in two different pickers.
Do you have any examples of combining them? Or introducing a flow going from one picker to the other without having two different buttons on the start screen to select from?
What I want is 1 button on the screen: "Select date and time" -> Opens combined picker (or picker flow)
I don't want 2 buttons: "Select date" "Select time" -> here you need to open two pickers independently. One for each button.
Any suggestions, examples and so on are more than welcome.
Thanks.
Every browser renders the native date and time pickers slightly differently.
If you're looking for a consistent solution, you can take a look at the Mobiscroll Date & Time Scroller.
It supports both Android and iOS, and it's themable, so you have even more control on how it looks & feels.