We successfully replaced a legacy Project Management System at the local IT department of a large supermarket chain with Web2Project. Most extensions are very specific, such as custom flat-file integration with SAP - so unfortunately unsuitable for the Community - but as a general principle, we only base ourselves on features provided by the core framework. Normally I have been able to find a solution for everything, but there is 1 small feature driving me around the bend. After development of 3 custom modules, I now require a Calendar control. In Java and .NET this is fairly simple, and I am a bit familiar with the jQuery library, which can be used in conjunction with PHP. However the standard W2P calendar control would suit my purpose, but I cannot get it to work properly. In my view, I load the loadCalendarJS libraries: global $AppUI, $cal_sdf; $AppUI->getTheme()->loadCalendarJS(); Next I instantiate a variable containing a date object: $start_date = new w2p_Utilities_Date(); Then I render Text Box and Calendar: format('%d/%m/%Y') : ''; ?>\" class=\"text\" /> \" alt=\"_('Calendar'); ?>\" /> For now I am not retrieving the preferences - just for testing - but that would obviously be better: $df = $AppUI->getPref('SHDATEFORMAT'); Initially the page displays correct date - no big deal - and I can select dates: ![alt text][1] However afterwards the selected date is not correctly formatted: ![alt text][2] Meanwhile I compared HTML sources from my new page and working pages like Reports, and same libraries are present. I included calender in \"editFrm\" and all sorts of things, but I fail to get it working. Does anyone in the community perhaps know what small detail I am overlooking? Having this small control would be of great help for all new modules, but I do not wish to re-invent the wheel. [1]: /storage/temp/264-cal1.jpg [2]: /storage/temp/265-cal2.jpg

asked 03 Jul '15, 05:22

patho's gravatar image

patho
0346
accept rate: 0%

edited 03 Jul '15, 05:25


As far as I can tell, \"201507010000\" is the MySQL format of the date-time field. I don't know if this helps you. Were I you, I would try something like this: $today = new w2p_Utilities_Date(); $today->convertTZ($AppUI->getPref('TIMEZONE')); $today = $today->format(FMT_TIMESTAMP_DATE);
permanent link

answered 03 Jul '15, 16:51

Themoulos's gravatar image

Themoulos ♦
217111622
accept rate: 22%

answered 03 Jul '15, 16:51

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×17

question asked: 03 Jul '15, 05:22

question was seen: 911 times

last updated: 03 Jul '15, 16:51

powered by Bitnami OSQA