How to show DateField with AM/PM format in blackberry? - user-interface

I don't know how to show Time in AM/PM format in blackberry using blackberry datefield.Pls give me a idea how to do this.

Use SimpleDateFormat:
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss aa");
long date = System.currentTimeMillis();
DateField dateField = new DateField("time:", date, timeFormat);
add(dateField);
alt text http://img171.imageshack.us/img171/7642/timeformat.jpg

Related

Localized date format in tooltip

In my chart I'm displaying revenue data on a date axis by day. I would like to show the date in the tooltip formatted by locale setting, i.e.
* en-us: 2019-03-19
* de DE: 19.03.2019
I created a codepen inspired by the amcharts example here: https://codepen.io/Me12345678/pen/vPorre
When I specify a locale, the tooltip is still showing the en-US format:
chart.language.locale = am4lang_de_DE;
I can format the date in the tooltip text, but then the format is static and won't change with the locale:
series.tooltipText = `{dateX.formatDate("dd MMM yyyy")}: [b]{valueY}[/]`;
Is there any way to specify an abstract format like "date without time" or "date with time" or "month only", so that amcharts displays it according to the locale setting?
Thanks for reading :-)
try this formatDate(\"dd.MM.YYYY\")
series.tooltipText = "[bold]{date.formatDate(\"dd.MM.YYYY\")}[/] \n + [bold]{valueY}[/]";

Set Current date as Max Date in Calendar Widget Kony Visualiser

I am developing an application with Kony Platform. I need to use a Calendar widget wherein I need to restrict selection of future dates. Is it possible? If yes, then how?
You need to set validEndDate properties as current date for the calendar widget. Please find the Same code
var mydate = new Date();
var currDate =[mydate.getDate(), mydate.getMonth() + 1, mydate.getFullYear()];
frmlanding.cal1.validEndDate = currDate;

Datepicker values only change when changing date

Is it possible to have datepicker land on todays date when the app starts?
currently my app shows no values on start up and only when I start changing the date in my datepicker then values start appearing. datepicker outputs values to labels
Which programming language do you use?
This code is for swift3 ;
You should write it in viewDidLoad()
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
dateFormatter.timeStyle = .none
yourTextField.text = dateFormatter.string(from: (NSDate() as Date))

kendo datepicker - set date without looking maxdate

I have one kind of scenario using date picker. I have date picker with max date=current date + 10 days,on page load only i want to show date more than the max date,but I'm allowing user to enter only up to max date. Is it possible. Without looking maxing date i want to display only the date what ever i want.code:-
var datepicker = $("#date" + uid).data("kendoDatePicker");
var addDays = new Date();
if (arr[1] == "") {
var d = new Date();
datepicker.min(new Date());
datepicker.max(new Date(d.getDate() , d.getMonth(), d.getDate()+ parseInt(arr[1]) - parseInt(1)));
}
I don't know if this is achievable. But what if you try to add two date pickers instead? One that display only the text, and the other only the calendar button. You need to play a bit the CSS, but I think it could spare you a lot of time.

Hide the date part on a DateTime field

I would like to have a time-only field on my CRM form. As it is apparently not possible, I plan to use a DateTime field and hide the date part (circled in red on the following image).
How can I hide the date part on a DateTime field using Javascript ?
Found it:
// Set the date in order to be able to modify the time
document.getElementById("field_name").DataValue = new Date(2000, 1, 1);
// Hide the date part
document.getElementById("field_name").childNodes[0].childNodes[0].style.display =
"none";
document.getElementById("field_name").childNodes[0].childNodes[1].style.display =
"none";

Resources