Twitter
Calendar Field -- Modified V1.2 / V2.0 to support multiple submission formats

calendar.png

Based on a comment of maikkaune at http://www.mightyextensions.com/support-desk-forum/item/tickets-topics/32-resources/22430-format-or-simplify-the-date-field-on-submission we want to share a modified Calendar field where you can select your input (submission) format.


V1.6.2 26 August 2010

Changed "+1 Day" computation


V1.6.2 25 August 2010

Based on requests from koraykupe

Added 2 new "Day Computation" modes --> Ceil() and +1 Day
Added "Last Day Message"
Added new "Display Mode" --> "Days + Date"

 


 

V1.6.1 24 August 2010

Added "Text Before" and "Text After" for different display states (Past, Notification, Normal)
Added "Display Mode" (Date or Number of Days from actual date)
Added "Day Computation" mode (Int() or Round() ) --> Int will display the Number of days without rounding.
Example: 4.6 Days would be displayed as 5 Days with Round(), but as 4 Days with Int().

 


 

V1.6 24 August 2010
Based on suggestions of maikkaune, a time picker was added.

Added "Time Picker" with several options
Select optional hours, minutes, seconds
"Sign Before" and "Sign After"
"Break after Date" will put the time picker on  new row

Validation code is now in external javascript for smaller html generation and sharing between fields.

Resave plugin parameters.

 


V1.5.1 01 August 2010

 

Added "Validate Input Date" and "Validation message"
Based on ME Calendar 2.0 format validation, added date and time check, incl. leap year check.

 


 

V1.5 28 July 2010

Updated to work with ME Resources 1.5

Added "Default Date"
Default date, when creating a new record --> either "Empty" or "Actual Date"

Added "Notification Days"
Number of days from today (to be displayed with a different style)
Leave it empty to ignore the function.

Added "Styling" and "Color" options for 3 date ranges (Normal, Notification Period, Past)
Color can be encoded as color name (red, blue...), color HEX (#FF00FF) and color RGB (rgb(0,255,0), ..) value
See list of color names: http://www.w3schools.com/css/css_colornames.asp
BLINK Attribute is not supported by most modern browsers.

"Notification days" can be useful as a reminder for subscriptions. It can be defined to change the display color in the last X days before expiration and then again to another color for expired records.
The state can then be easily identified through the display color.


V1.2.2 30.May.2010

Added "Storage Format".
2007-01-20 (%Y-%m-%d) or
2007-01-20 03:45:07 (%Y-%m-%d %H:%M:%S)
If %Y-%m-%d %H:%M:%S is chosen then 00:00:00 will be added to the date

Added Feature Request "Override Field"
Options: None, Creation Date, Expiration Date
If you want to overwrite, choose "Storage Format" %Y-%m-%d %H:%M:%S

Version 1.6.2
License Other
Type Non-Commercial
Extension type Plugin
sackgesichtAvatar

sackgesicht VIP
 
Votes: 0
Answers: 54
Hits: 3189
Modified: 02 Jan 2012

In Comment section you can leave only reviews. If you have questions or support requests ask in Support Desk / 3DP Extensions category or send Personal Message.

Comments
clowrideAvatar
Quote
- -
Written by clowride VIP on 05 Apr 2010

very professionnal thank you very much

a must have

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 05 Apr 2010

Thank you very much and many "easter greetings" from germany !!! I will have a look on it as soon as possible.

I will do a feature request if this feature can find a way into the core datefields display as well. Certainly I will link to your solution. So, one problem still remains: Your solution is working for the custom date field. At the moment, my setup has to deal with the core creation-/futureDate fields, i am in a trap.

I don´t see an alternative for the future date setup, because in content list module is no option for custom fields (yet).

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 05 Apr 2010

Another thought...

Is it possible to have this for multiple languages? I mean, does it respect the site or browser language, so US and european differences are displayed correctly?

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 05 Apr 2010

@maikkaune

thanks for the greetings .. unfortunately we are not observing "Ostermontag" here ....

the date strings will follow your joomla language.
See (in back end) EXTENSIONS --> LANGUAGE MANAGER --> SITE
If you change the language there, the plugin will "translate" it into the correct language.
For multiple languages, you might have to look into JOOMFISH. (Have not used it yet ...)
Will check on your "core date field" problem later ...

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 05 Apr 2010

Thanks for your support and efforts :-)

My current Event-Calendar setup is driving me nuts. I am getting forth and back between the date field usage. Core vs. Custom.

The Core functions are nice, and work with ME modules and Lists. But it seems the current solution with future articles is really strange and limited. Compare the ME article dates with the joomla core ones: There you have CREATE;START;EXPIRE;(MODIFIED). I wonder why ME works with CREATE and EXPIRED only? In my humble opinion, the article CREATION date has nothing to do with the START/PUBLISH date. It would make sense to have a core ME START date as well, so this could be used for a FUTURE date. The creation date should not be touched.

I found another issue, when i use the visible creation date on submit forms! On EDIT article it does not show-up again in the form!?!? Only Expiration is editable. :-(

 

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 05 Apr 2010

Your solution is working for the custom date field. At the moment, my setup has to deal with the core creation-/futureDate fields, i am in a trap.


@maikkaune

your problem can be solved with a custom article form template. If there is some spare time in the next days, i will upload a version to the template section.

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 28 May 2010

Hello again,

just some strange thoughts... would it be possible to override the core date with the datefield plugin? I think Resources 1.5 will have the same core date features as the previous release, so i had this idea ;-)

Is it possible to add two parameters in the plugin, that will tell which core date will be overridden? e.g. 1 checkbox for "Override Create Date", 1 checkbox for "Override Expire Date". I don´t know the inner backend logic... but is it possible to write those dates into the core date fields on submission?

That would be a nice temp solution with no need to modify the resources component.

Thanks for listening.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 30 May 2010

@maikkaune

this is possible. i will add this functionality and upload it later here.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 30 May 2010

@maikkaune

V1.2.2

Added "Storage Format".
2007-01-20 (%Y-%m-%d) or
2007-01-20 03:45:07 (%Y-%m-%d %H:%M:%S)
If %Y-%m-%d %H:%M:%S is chosen then 00:00:00 will be added to the date

Added Feature Request "Override Field"
Options: None, Creation Date, Expiration Date
If you want to overwrite, choose "Storage Format" %Y-%m-%d %H:%M:%S

Try, if this is what you wanted ....

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 30 May 2010

I will try this ASAP! On first sight... simply great! Send you a PM with ideas about the TIME values.

-
clowrideAvatar
Quote
- -
Written by clowride VIP on 12 Jun 2010

hello

can you tell me if work with mighty ressource 1.5

best regards

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 12 Jun 2010

This version is for 1.4.7 only.

I will upload a version for 1.5 with additional features tomorrow.
I added display styling for different time groups (past, current and future dates based on number of days).

-
clowrideAvatar
Quote
- -
Written by clowride VIP on 12 Jun 2010

thank you for all

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 28 Jul 2010

sorry, forgot to upload earlier ....

V1.5  28 July 2010

Updated to work with ME Resources 1.5

Added "Default Date"
Default date, when creating a new record --> either "Empty" or "Actual Date"

Added "Notification Days"
Number of days from today (to be displayed with a different style)
Leave it empty to ignore the function.

Added "Styling" and "Color" options for 3 date ranges (Normal, Notification Period, Past)
Color can be encoded as color name (red, blue...), color HEX (#FF00FF) and color RGB (rgb(0,255,0), ..) value
See list of color names: http://www.w3schools.com/css/css_colornames.asp
BLINK Attribute is not supported by most modern browsers.

"Notification days" can be useful as a reminder for subscriptions. It can be defined to change the display color in the last X days before expiration and then again to another color for expired records.
The state can then be easily identified through the display color.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 01 Aug 2010

V1.5.1  01 August 2010

Added "Validate Input Date" and "Validation message"
Based on ME Calendar 2.0 format validation, added date and time check, incl. leap year check.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 24 Aug 2010

V1.6 24 August 2010
Based on suggestions of maikkaune, a time picker was added.

Added "Time Picker" with several options
  Select optional hours, minutes, seconds
  "Sign Before" and "Sign After"
  "Break after Date" will put the time picker on  new row

Validation code is now in external javascript for smaller html generation and sharing between fields.

Resave plugin parameters.

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 24 Aug 2010

Hello, thanks! It availed me greatly. Can you add suffix text messages for past days and notification? I made a custom hack but if you add this feaute i'll glad.

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 24 Aug 2010

It should show how many days left or past. Thx.

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 24 Aug 2010

@sackgesicht

Thank you very much for your time and efforts in this modification and our long PM sessions. You saved my life! and the current project ;-)

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 24 Aug 2010

@ koraykupe

The number of days depends on the point of view.
Example: Today is August 24. How many days is it until August 26?
It can be 1,2 or even 3.
a) 1 day if it is counts until 26/08/2010 00:00:00 and now is already august 24, past lunch time.
b) 2 days if you make it 26-24 ...
c) 3 days if you count 24,25,26 ....
Important is here also the local time zone...

I look for a good solution to consider all these factors ...

@maikkaune
you are welcome ... ;-)
but we still have some features to include ... storage in external field, field size, alternative time field, alternative time picker .. etc etc etc   

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 24 Aug 2010

@sackgesicht

;-) yes, the storage in external, selectable seperate fields are still my favourite and would come in handy. I encountered a project with old databases, where date is in a field with yyyy-mm-dd and time is in a 2nd field hh:mm:ss

Looking forward to some "nightly" PM sessions in good 'ol german language :-)

 

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 24 Aug 2010

V1.6.1 24 August 2010

Added "Text Before" and "Text After" for different display states (Past, Notification, Normal)
Added "Display Mode" (Date or Number of Days from actual date)
Added "Day Computation" mode (Int() or Round() ) --> Int will display the Number of days without rounding.
Example: 4.6 Days would be displayed as 5 Days with Round(), but as 4 Days with Int().

@koraykupe
I hope, this is what you requested ... 

Attachment: 1282661836_cal_label.pdf (Size: 17 Kb | Hits: 433)

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 24 Aug 2010

@sackgesicht

I meant "last X days". Like 3rd option that you wrote. (I don't use hours)

I'll try to make another modification for this feature.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 24 Aug 2010

hmmm .. did you download the latest version?

check the attached PDF from my last comment ... it should be exactly wht you described.
For the Notification days, you can set a label before = "last" and then the label after ="days".. Display Mode = "Days" ...

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 24 Aug 2010

We write comments almost at the same time. You posted it shotly before me. :) Ok, i am updating it and share result.

Thanks a lot.

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 25 Aug 2010

I selected to tomorrow date on field settings but it shows "0" on days mode for notification days. It should count also today. "Last X day"

If i select next day it shows "1" instead of "2"

It says 1 days less.

It's relative i know... Maybe i can do it only for me.

Also please add days + date mode.

Thanks.

 

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 25 Aug 2010

Please see my earlier comments. It depends how you "compute" it and it all depends also on your time settings.
Example:
If your target date is tomorrow (2010-08-26 08:00:00) and it is now (2010-08-25 21:00:00) then it would show 0 days, since it is only 11 hours to go (less then half a day).
Maybe you can set the target date to 2010-08-26 23:59:59 and the computation mode to "Round()".
How should the "Days + Date Mode" look like?
prefix DAYS suffix DATE ?

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 25 Aug 2010

I use neither input format nor storage format. This is day calculating problem's cause.

Days + Date mode:

Days<br />prefix Date suffix

If i use day mode normal showing and notification days showing becomes same except text before and text after.

Also i want to write if past day = 1 show "Last Day" message.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 25 Aug 2010

I use neither input format nor storage format. This is day calculating problem's cause.

????? There is always an input an a storage format selected. If you save in the standard format (recommended) = "%Y-%m-%d %H:%M:%S" then there is a time saved in your field value. This is the time which will be used for the computation against the actual date and time.

Advice is to set the time to 23.59.59 so it will count up to the last minute of the day. This will solve also your "missing day" problem.


You can check this, if you set a date 1 minute in the future and refresh the page.. you can see the moment, when it switches to past mode. The best is to use a color to see the difference. 

Days<br />prefix Date suffix

For confirmation: The output will look like:
2
prefix 26.08.2010 suffix

If i use day mode normal showing and notification days showing becomes same except text before and text after.

Select a color to make it different. 
Example: Normal has no color setting, notification is 'orange' and past is 'red' .. see my example settings in attached PDF from August 24.

Also i want to write if past day = 1 show "Last Day" message.

For confirmation: INSTEAD of 0 (=last day), you want to display a "Last day" message?

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 25 Aug 2010

* Oh, sorry. I meant i don't use hour/min/sec on storage format so, no need to calculate hour difference.

 

* No, it'll look like:

prefix 2 suffix

26.08.2010


* Yes, correct (instead of 0, output'll only "Last day")

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 25 Aug 2010

V1.6.2 25 August 2010

Based on requests from koraykupe

Added 2 new "Day Computation" modes --> Ceil() and +1 Day
Added "Last Day Message"
Added new "Display Mode" --> "Days + Date"

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 25 Aug 2010

Great, thanks. :)

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 25 Aug 2010

In +1 day mode it shows notification days correct but past days 2 more.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 25 Aug 2010

check the time part of your date.
if you don't have  a time or if the time is 00:00:00 it will expire immediately when the day starts after midnight, therefor you "loose" 1 day in the computation for your purpose.  
set the time of the target date to 23:59:59 (or any other time you want it to expire) and the computation mode to int(), then it will expire at the end of the day and will start displaying the "last day" at midnight.  

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 26 Aug 2010

i will change the "+1 day" logic 

Example:

assumption is that you dont have time in your field or the time = 00:00:00...
if your date in the field is august 27, it will display on august 26 -> "1 day", and on August 27 it will display "last day".

is this how it should be?

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 26 Aug 2010

For +1 day mode,

OK but it adds text before and text after to last day text. It becomes "before text Last Day after text"

also if i set 25/08/2010 (today 26/08/2010) it shows "Last day + past text after"

and if i set  24/08/2010 it shows number 1 day less. (it shows "1")

-
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 26 Aug 2010

For trying i enabled time picker and select hours, min, sec as YES but it doesn't show any select list.

Does it need to com_validate?

And is there any way to make defaul numbers for only hours, min and sec?

-
VasiletsAvatar
Quote
- -
Written by Vasilets VIP on 02 Sep 2010

Is it possible to make this field searchable?

-
VasiletsAvatar
Quote
- -
Written by Vasilets VIP on 03 Sep 2010

Little explanation:

It's possible to search only by the "Storage Format" data. For example this data i can search 2010-09-03. But "Output Format" I have like 03.09.2010. And I can't search by output format.

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 03 Sep 2010

"Search" works only for the way, the data is stored. You can not search for the "output" format.
But you can use the date range filter to "search". To do this you have to follow this instruction:
http://www.mightyextensions.com/support-desk-forum/item/tickets-topics/32-resources/24388-empty-default-date-in-the-calendar-field-resources-1-5

To search/filter by the "output" format, you need a more "flexible" date range filter. This was also suggested by maikkaune earlier. I might look into it in the next days.

-
Red HorseAvatar
Quote
- -
Written by Red Horse VIP on 17 Sep 2010

Hi,

First, thanks for making this available, adds several features that really improve the function when using Resources for a calendar. Now the question, I can't seem to get the date picker to show up, should it be? And, if it should be showing up, any tips about where I might have made a mistake in configuration?

Thanks again

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 18 Sep 2010

@Red Horse

Yes, the date picker should show up, it uses the Joomla calendar. In case it does not show up, there might be a javascript conflict. Is the calendar 2.0 date picker showing up?

If you referr to the time picker, the select box should show up for all settings except if you select "%Y-%m-%d %H:%M:%S" as your input format (since it has already the time component in its format).

-
Red HorseAvatar
Quote
- -
Written by Red Horse VIP on 18 Sep 2010

@sackgesicht

It works fine. I'm can't believe that I missed something that seems so obvious once you point it out. I'm just glad that I didn't mention all the ridiculous steps I took trying to find a solution.

Thanks again for a great addition to the calendar function. And thanks for the quick answer.

-
Red HorseAvatar
Quote
- -
Written by Red Horse VIP on 20 Sep 2010

Hi - can you give me any pointers on changing the time picker to U.S. time format? I thought I knew how, but it turns out that I've overestimated my knowledge. Can this be changed right in the field, or does it require a change elsewhere in the sytem?

Thanks

-
sackgesichtAvatar
Quote
- -
Written by sackgesicht VIP on 20 Sep 2010

At the moment it only supports the 24h format. I will add US format in the next days (12h am/pm)

-
Red HorseAvatar
Quote
- -
Written by Red Horse VIP on 20 Sep 2010

12 hr am/pm is exactly what I'm looking for. Will be absolutely perfect for my use - and I'll bet a lot of other people will be glad for the ability to choose 24 hour or am/pm clocks. Thanks very much for your willingness to keep adding options. Amazing.

-
Red HorseAvatar
Quote
- -
Written by Red Horse VIP on 27 Oct 2010

Any news on the am/pm format? Everything else is working great. Thanks again for this field.

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 02 Dec 2010

Validation problems!

I use terix calendar plugin to validate and override the core-dates. The validation does not work... please don´t ask me why ;-) I am sure it was working at the beginning. And maybe i updated to the last version... and used the calendar popup to make the testing faster and less annoying.

The manual input does not work with validation ON? I mean, i always get the error message about a wrong date format. Then i have to use the calendar-popup.

Another strange thing... a second click on the popup (to change the previously entered date) does also show the error message... and the field is set to blank again.

Anyone else with this behavior?

-
snooky147Avatar
Quote
- -
Written by snooky147 VIP on 06 Jan 2011

Hi, very nice, that's what I was looking for !

Could you tell me if it's possible to add function which will announce birthday in x days (with x params) : allow to display "birthday in x days" or "birthday today" when current date arrive at date - x.

Thanks and happy new year ...

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 06 Jan 2011

@snooky147

funny, two days ago I had exactly the same idea and request. Its under revision, right ;-)

-
azrael007Avatar
Quote
- -
Written by azrael007 VIP on 23 May 2011

Thanks for your work !

-
snooky147Avatar
Quote
- -
Written by snooky147 VIP on 14 Jun 2011

Hi,

I have no more validation now !

Field is request, but if I write 4 mai 1959 and validate format is 04/05/1959, it's validated but not insert in database !!

Any idea or update ?

Thanks

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 27 Jul 2011

Can´t rate this item? Just favourite worked for me.

 

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 02 Jan 2012

Stupid question:
What is day count mode "Ceil()" ? 

-
Add New Comment
Name:
Email:
Comment:
Attachment
Hide Comment
Security code:
Enter text as you see on image
 
 

Latest Extensions

What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1169 guests and 6 members online


MightyTemplate - Professional Joomla Templates