Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Calendar Popup - change starting weekday from SU to MO

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Calendar Popup - change starting weekday from SU to MO
 Login/Join
 
Member
posted
Hi,
I am using WF 8105 and want to make calendar popup more European like - starting weekdays from left with MO (Monday). Where I have to change something?

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.2.XX
 
Posts: 23 | Location: Europe | Registered: November 28, 2014Report This Post
Virtuoso
posted Hide Post
Haven't tried it myself but have you look at the computer's regional setting ?

I think that it may be related to that. So if it's the case nothing you can do since it will be displayed according to each PC setting.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Have you tried setting WEEKFIRST? I don't know if this affects calendar controls or not. Another option is to use a little java script date picker named pikaday. Just google it.

The WEEKFIRST parameter specifies a day of the week as the start of the week. This is used in week computations by the HDIFF, HNAME, HPART, HYYWD, and HSETPT functions, described in the Using Functions manual.

The HPART and HNAME subroutines can extract a week number from a date-time value. To determine a week number, they can use ISO 8601 standard week numbering, which defines the first week of the year as the first week in January with four or more days. Any preceding days in January belong to week 52 or 53 of the preceding year.

Depending on the value of WEEKFIRST, these functions can also define the first week of the year as the first week in January with seven days.

The WEEKFIRST parameter does not change the day of the month that corresponds to each day of the week, but only specifies which day is considered the start of the week.

The syntax is:
SET WEEKFIRST = {value|7}

where:
value
Can be:

1 through 7, representing Sunday through Saturday with non-standard week numbering.

or

ISO1 through ISO7, representing Sunday through Saturday with ISO standard week numbering.

Note: ISO is a synonym for ISO2.

The ISO standard establishes Monday as the first day of the week, so to be fully ISO compliant, the WEEKFIRST parameter should be set to ISO or ISO2.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Member
posted Hide Post
My regional settings are set to English UK and that not helps.

Pikaday looks good, but can somebody help and give instructions how to get this working. Where to copy and what files(as it is not just installer you can install)?


WebFOCUS 8.2.XX
 
Posts: 23 | Location: Europe | Registered: November 28, 2014Report This Post
Master
posted Hide Post
Assuming your calendar has an ID named "calendar1", you could do this using jQuery:

//Begin function window_onload
function window_onload() {

UpdateData();
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
var calendar_icon = $("#calendar1").nextAll("img").first().offset();
$("#calendar1").datepicker("option", "firstDay", 1);
$("#calendar1").nextAll("img").first().css("position", "absolute");
$("#calendar1").nextAll("img").first().css("left", calendar_icon.left + "px");
$("#calendar1").nextAll("img").first().css("top", calendar_icon.top + "px");
}
//End function window_onload

When your browser window loads, the code you see above placed in the "window_onload" event will change the starting day of the week to Monday. That actually happens in the "datepicker" line of code; when that line executes it resets the calendar icon so that it is positioned in the upper left corner of the window. The other lines of code reposition it next to the input box where the date shows.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Member
posted Hide Post
This works very well, thank you Squatch. Short, simple and elegant solution.

One more problem I have with calendar popup. I have date format DD/MM/YYYY and so it is shown in date box. For example if I choose 2nd Apr 2016 it is shown as 02/04/2016. ANd now if I open calendar popup again system interprets this date as 4th Feb 2016 and preselects this date on popup.
If I choose 15th Jan 2016 and open popup again it does not recognize this date (as there are not 15th month) and preselects current date.

How can I set the javascript calendar popup to understand that my date format is DD/MM/YYYY?
In the screenshot there was 01/04/2015 (as 1st of April 2016) and if I open a calendar popup it preselects 4th of Jan 2016.
And now if I select this date it appears in date box as 04/01/2016 (DD/MM/YYYY).

This message has been edited. Last edited by: Aimar Arak,


WebFOCUS 8.2.XX
 
Posts: 23 | Location: Europe | Registered: November 28, 2014Report This Post
Expert
posted Hide Post
I haven't started using App Studio yet, but it appears the GUI uses standard jQuery UI controls (if not, I apologize), so you can set the date format option. See the doc:

jQuery UI Datepicker

// Setter
$( "#calendar1" ).datepicker( "option", "dateFormat", "dd-mm-yyyy" );


(Meanwhile, I am fruitlessly trying to get the world to accept the only unambiguous date format YYYY-MM-DD...)


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
I think there should only be two y's for a four-digit year:

// Setter
$( "#calendar1" ).datepicker( "option", "dateFormat", "dd-mm-yy" );

That being said, I didn't need to use that line of code. I just went to the calendar's Settings panel and changed the date format to DMYY. I'm not sure why you would be getting mixed dates like that, Aimar. Strange.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Expert
posted Hide Post
I've seen the exact same behaviour on of my colleague's App Studio v8.0.08 screens...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
quote:
Originally posted by Francis Mariani:
I've seen the exact same behaviour on of my colleague's App Studio v8.0.08 screens...

And Aimar is using the exact same version of WebFOCUS that I am... something for me to look forward to, I guess... *sigh*


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Calendar Popup - change starting weekday from SU to MO

Copyright © 1996-2020 Information Builders