I am trying to add a dateTime edit box in an xPage and I would like to show the date and time
with a specific pattern that I define. The pattern is "MMM d, yyyy HH:mm". The date and time
appear in the desirable format when I open the xPage. The problem is caused when I select the checkbox "Use date/time picker pop-up". After this change, the time is not displayed correctly. It is always 00:00. Is this a bug? Or do I need to configure differently the edit box in order to use the pattern I want and be able to add a data/time picker properly?
Any help will be highly appreciated.
Thanks a lot for your time!
Yes, it's bug. I have reported it to IBM support.
You could use ExtLib Dojo Date and Time controls. There the problem is that there is a separate control for Date and Time and there is no built in way to save them in same item on document. You can do it with some SSJS though.
I have used a reqular Date/Time Edit Box ja ExtLib Dojo Time Text Box. The edit box is set to show date only and bound to my Date/Time field on datasource form. The Dojo Time Text Box gets its default value from the same Date/Time item on document.
In data source querySaveDocument event I have this code which adds the time to the date selected in date edit box:
// When time field is empty we get Java Date.
var dtDate:java.util.Date = getComponent("inpDT").getValue();
var dtTime = getComponent("djTime").getValue();
if (typeof dtTime == "lotus.domino.local.DateTime") dtTime = dtTime.toJavaDate()
// Combine date and time.
if (dtDate != null && dtTime != null) {
var dtDateTime:NotesDateTime = session.createDateTime(dtDate);
dtDateTime.setLocalTime(dtTime.getHour(), dtTime.getMinute(), 0, 0);
dominoDocument.replaceItemValue("DT", dtDateTime);
}
Related
I am working within Infopath and I am trying display a today() or a now() in a field if a checkbox in the form is selected (ie auto populate a date if a checkbox is selected).
I tried making a rule "if checkbox is not blank, action, set field's value, today()
but it doesnt work.
I was thinking of placing a IF statement
(TrueResult | ElseResult) [(BoolCondition) + 1] but I have no idea how I would format that.
Thanks for your help/suggestions.
R
Check the steps below.
1.Create a Infopath form.
2.Add Check Box control and a Text Box control into this form.
3.Click the Check Box, add rule->select "Is Checked"->"Set a Field's Value".
4.Set a field's value with today() method.
Is there a way I can use calendar filter in Spotfire? I am aware of the range filter, but I want the user to only be able to select one date from a range of dates coming from a table.
it's a little bit advanced and requires some scripting (although code is provided), but a date picker can be used:
http://spotfired.blogspot.ch/2014/05/popup-calendar-webplayer-compatible.html
the result is something like this:
I know this is two years old but I still came across this post and I figured someone else will too.
To get the calendar to filter follow these steps:
Edit the Text Area
Click "Insert Filter"
Click the column from your data that contains dates
Click "Ok"
Once you save, you will have a slider in the text box and two calendars where dates can be picked or you can utilize the slider.
The current version of Spotfire has a calendar date picker built into the filter and data panels (but it is part of the range slider).
You can also insert this filter into a text area if you want a more custom user interface. See below:
Calendar date picker in Spotfire text area
I found a solution to implement custom actions for the prev and next buttons in a Fullcalendar.
But I don't know, how I can use it for my case. I want to change the displayed date range of the <p:calendar> if the <p:schedule> switches into the next month/year and the same for the other direction. My construct looks like a simple Outlook Calendar.
I gave the <p:calendar> the possibility to update the <p:schedule>'s initalDate on dateSelect. So the schedule is hopping to the date range of the selected date. But how can I handle the event, if the <p:schedule> has 'month' view and the user decide to go in another month by clicking the prev/next button? The same i got if the user uses <p:calenadar> Buttons and Navigator.
My first idea was to create a ManagedBean which save the state of the current date range. And call an custom event if the previous/next buttons or the navigator get clicked. This event compare the given ranges and update. But I think this isn't possible or is it?
Thanks for your replies.
You have to use a LazyScheduleModel Object to do that
ScheduleModel eventModel = new LazyScheduleModel() {
#Override
public void loadEvents(Date start, Date end) {
handlePreviousNext(start, end);
}
};
I am trying to take a calendar title and let it show up as a default column value when someone tries to add a new event. Is there a way to do this within SharePoint, if so how?
Thank you for all the help.
Lucky
Quick solution >> When you change title of calendar, set Default value of that column as well.
Proper solution >> Create an event receiver for calendar and in ItemAdding event set value of title... should be like item["Title"] = item.ParentList.Title
I am working with some Date fields in Microsoft Dynamics CRM 2011 and want to get rid of the little calendar icon that brings up the date selector. This selector is just too unwieldy for use of dates more than a month old. Any thoughts on how to get rid of it?
Here's a couple ways (both require adding a JavaScript web resource and using the following code inside of a function which you register as the OnLoad event on the form):
1:
Xrm.Page.getControl('birthdate')._control._element.getElementsByTagName('img')[0].style['display'] = 'none';
2:
var controlID = 'birthdate';
// The icon has the 'img' string appended to the control ID
var imageID = controlID + 'img';
document.getElementById(imageID).style['display']='none';
If you want the input to take up the rest of the space you could hide the parent TD cell and then set the colSpan to 2 on the previous TD cell.
Feel free to add null checking ;)