Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hello Friend!

Sorry to bother you.

most have a question that I believe will not take your time.

for your help my calendar ta okay.

when I make a record of a cloned page for the calendar I need to go to advanced settings to place a future date.

I searched the forum and encrontrei a topical conversation about this assundo. viewtopic.php?f=8&t=7672?

It works well, plus the date format this 24.6.2016 (yyyy-mm-dd).

I'm from Brazil and I need the date format is 24/06/2016 (dd / mm / yyyy).

It has some way to create a field.

example:
day month Year
Field 1 Field 2 Field 3

:| :| :|
Hi,

We can do that by modifying the original solution (viewtopic.php?p=12070#p12070) just a little bit.

Instead of defining the 'start_date' region as type 'text' (as we did in the original), we can define it of type 'datetime' editable region instead like this -
Code: Select all
<cms:editable
    name='start_date'
    label='Start Date'
    type='datetime'
    format='dmy'
    fields_separator=','
    default_time='@current'
    required='1'
    validator='MyEvent::start_date'
    validator_msg='myevent::start_date=Incorrect date format'
/>

In the code above, we have set the 'format' to 'dmy' (we have a choice of 'dmy', 'ymd' or 'mdy') to make the date fields show up as follows -
date.jpg
date.jpg (4.12 KiB) Viewed 637 times


IMP: Please make sure to enable 'data-bound form' addon to make this region available. To do that, uncomment (i.e. remove the leading two slashes '//') from the following line in 'couch/addons/kfunctions.php' file -
Code: Select all
require_once( K_COUCH_DIR.'addons/data-bound-form/data-bound-form.php' );


Nothing else needs to be changed in the original solution.
Hope it helps.
Hello!

problem solved.
thank you! :D :D
3 posts Page 1 of 1

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests

cron