Re: Using JQuery UI Datepicker for formatted date fields (dd/mm/yy)

2014-05-12 Thread scs
You can also do a afterfind to convert the date to your format and then a beforesave to convert the date back to mysql format. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the G

Re: Using JQuery UI Datepicker for formatted date fields (dd/mm/yy)

2014-05-10 Thread Dario Savella
Thank you for replying. I was afraid that was the case... I will build a small helper to do that. > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" g

Re: Using JQuery UI Datepicker for formatted date fields (dd/mm/yy)

2014-05-08 Thread dario gaston musante
I´ve solved this type of issues with a hidden field having the value in sql format (-MM-DD ) and formatting the date for user with php in the text field. ( http://php.net/manual/en/function.date.php ) jquery can set 2 fields with the diferents formats. ( http://jqueryui.com/datepicker/#alt-

Using JQuery UI Datepicker for formatted date fields (dd/mm/yy)

2014-05-06 Thread Dario Savella
I was able to make this work without much of a problem using dates in the format they arrive from the database. But that's not an acceptable for the users... and here I started having problems. It's easy enough to set the dateFormat of the datepicker (as suggested in posts I've seen around), bu

How to change lanuage in form's date fields

2011-07-18 Thread Dominik Gajewski
Hi I have no idea how to change language display dates in forms, i have default English, but how to change on language of operating system? And second how display only year and month fields without day in form? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org

Re: Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-20 Thread Joshua Muheim
OK, thank you for the information! On Wed, Oct 20, 2010 at 9:17 AM, AD7six wrote: > > > On Oct 20, 12:56 am, cricket wrote: >> On Tue, Oct 19, 2010 at 6:02 AM, psybear83 wrote: >> > Hi everybody >> >> > Is there a reason why CakePHP doesn't recognize dates before >> > 1600-01-01? I get a valida

Re: Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-20 Thread AD7six
On Oct 20, 12:56 am, cricket wrote: > On Tue, Oct 19, 2010 at 6:02 AM, psybear83 wrote: > > Hi everybody > > > Is there a reason why CakePHP doesn't recognize dates before > > 1600-01-01? I get a validation error when submitting a date before > > that (e.g. 1599-31-12 or 1300-11-05). > > Use th

Re: Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-19 Thread Joshua Muheim
Wow... It seems I'm always asking for things I suppose have an easy answer (but I'm too dumb to find them myself), and then it comes out that nobody else really knows it as well... ;-) Thanks for you explanations, cricket! I'm not using any dates in the past at all in my application, but I stumble

Re: Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-19 Thread cricket
On Tue, Oct 19, 2010 at 6:02 AM, psybear83 wrote: > Hi everybody > > Is there a reason why CakePHP doesn't recognize dates before > 1600-01-01? I get a validation error when submitting a date before > that (e.g. 1599-31-12 or 1300-11-05). Use the source, Luke. http://api.cakephp.org/view_source/v

Re: Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-19 Thread Joshua Muheim
I'm using MySQL. mysql --version Ver 14.12 Distrib 5.0.51a, for apple-darwin9.0.0b5 (i686) using readline 5.0 On Tue, Oct 19, 2010 at 3:30 PM, Chris Burch wrote: > Sounds like a database issue. I know 1600-01-01 is Oracle's "first > date". > > On Oct 19, 5:02 am, psybear83 wrote: >> Hi everybod

Re: Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-19 Thread Chris Burch
Sounds like a database issue. I know 1600-01-01 is Oracle's "first date". On Oct 19, 5:02 am, psybear83 wrote: > Hi everybody > > Is there a reason why CakePHP doesn't recognize dates before > 1600-01-01? I get a validation error when submitting a date before > that (e.g. 1599-31-12 or 1300-11-05

Dates before 1600-01-01 are not recognized by models' date fields?

2010-10-19 Thread psybear83
Hi everybody Is there a reason why CakePHP doesn't recognize dates before 1600-01-01? I get a validation error when submitting a date before that (e.g. 1599-31-12 or 1300-11-05). Thanks, Josh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related q

Re: date fields

2010-09-29 Thread wrdevos
Or you might just use PHP to do it: echo date('l, d-m-Y', strtotime($this->data['Model']['date_field'])); Further reading: http://php.net/manual/en/function.date.php http://www.php.net/manual/en/function.strtotime.php ~wrdevos On Sep 29, 4:50 pm, "Mike Karthauser" wrote: > On Wed, September 29

Re: date fields

2010-09-29 Thread Mike Karthauser
On Wed, September 29, 2010 3:22 pm, james livsey wrote: > yeah its a database field - just a regular date outputting 'September 29 > 2010' but i need to 'add' the day to that output - does that make sense? > > so if the outputted date is the above i need to work out that the day is a > Wednesday.

Re: date fields

2010-09-29 Thread james livsey
yeah its a database field - just a regular date outputting 'September 29 2010' but i need to 'add' the day to that output - does that make sense? so if the outputted date is the above i need to work out that the day is a Wednesday. Thanks for replying! On Wed, Sep 29, 2010 at 3:19 PM, Tilen Maj

Re: date fields

2010-09-29 Thread Tilen Majerle
Time Helper u mean? or u mean database fields? "created" and "modified" ("updated") -- Tilen Majerle http://majerle.eu 2010/9/29 james > Hi, > > is there a cake way to work out the day from a date field? > > thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help other

date fields

2010-09-29 Thread james
Hi, is there a cake way to work out the day from a date field? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gro

Null date fields in scaffolding

2010-09-03 Thread aries
Hello, I'd like to have date fields that allow null values to default to a null selection in the date/time menus when generating pages from the admin scaffold. I found ticket 5702 that suggests a patch, but that's for Cake 1.2, I wasn't able to work out a fix for 1.3. Has anyone

Re: Skipping Validation on Date Fields

2009-02-12 Thread Smelly_Eddie
Hmm I thought if you left out the field entirely that was the straightforward fix. $validate should only mention fields you want to validate On Feb 11, 5:41 am, overture wrote: > I am having issues with validation on date fields.  I need to ignore > validation for a date field, howe

Skipping Validation on Date Fields

2009-02-11 Thread overture
I am having issues with validation on date fields. I need to ignore validation for a date field, however, I have tried everything and can't find a solution. I have changed the validation on the model to:- 'actual_start_date' => array( 'rule'=>'date&#x

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-18 Thread Sebastian Göttschkes
Hi, thanks for your reply. The data field was set to null before. If I update a dataset and assigning the null value to a the birthday field (SET birthday=null) it works fine. So I added the following code to my controller: if(empty($this->data['Employee']['birthday'])) $this->data['Emplo

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-17 Thread Adriano Varoli Piazza
On 16 dic, 11:44, Sebastian Göttschkes wrote: > Additionally, if I add a valid birthday, it is saved correctly. When > editing the employee, I would like to get the birthday viewed in the > format dd.mm.. How can I tell cake to view the birthday like this? Ok, here's what I've done: in the

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Adriano Varoli Piazza
e 'null value' for a date field. I have the problem of dates that can be full, or just years, or just years and months, so I can't use a date field at all, and have to validate my dates otherwise. Basically, to edit the date fields as you like, you have to process them before saving

AW: cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Liebermann, Anja Carolin
pe that helps. Be careful what format to validate! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von Sebastian Göttschkes Gesendet: Dienstag, 16. Dezember 2008 14:45 An: CakePHP Betreff: cake 1.2 forms: date fields left empty

Re: cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Alexandru Ciobanu
Sebastian Göttschkes wrote: > Hi, > > i got the following problem using cakePHP 1.2 RC3: > > My Model 'Employee' has a attribute called 'birthday' (datatype: > DATE). In the add-view, I have the following code: > input('birthday',array('type'=>'text'));?> > If i left this field blank when adding a

cake 1.2 forms: date fields left empty => null in database?

2008-12-16 Thread Sebastian Göttschkes
Hi, i got the following problem using cakePHP 1.2 RC3: My Model 'Employee' has a attribute called 'birthday' (datatype: DATE). In the add-view, I have the following code: input('birthday',array('type'=>'text'));?> If i left this field blank when adding an employee, this employee has the birthday

Re: bug? or whats the matter with date fields?

2008-11-25 Thread Mark (Germany)
only thing i can say, is that villas and Dardo Sordi Bogado were right there was no documentation on that, but now i know that it is better to avoid such naming conflicts anyway, if i ever publish a "cake Look-Out-list", this will definitly be on it i still do not know what xavier wanted to tel

Re: bug? or whats the matter with date fields?

2008-11-10 Thread Xavier Mathews
I am still over looking the problem and then i will prepare a statement and tell you my point. On 11/10/2008, Mark (Germany) <[EMAIL PROTECTED]> wrote: > > @xavier: > what exactly is your point? :) > > > On 10 Nov., 12:12, "Mark (Germany)" <[EMAIL PROTECTED]> > wrote: >> well, i sure could have r

Re: bug? or whats the matter with date fields?

2008-11-10 Thread Mark (Germany)
@xavier: what exactly is your point? :) On 10 Nov., 12:12, "Mark (Germany)" <[EMAIL PROTECTED]> wrote: > well, i sure could have renamed it if i had known that it is a problem > a) to name a field like the model > b) to name it like a reserved word > > thx so far > > On 10 Nov., 02:11, "Xavier M

Re: bug? or whats the matter with date fields?

2008-11-10 Thread Mark (Germany)
well, i sure could have renamed it if i had known that it is a problem a) to name a field like the model b) to name it like a reserved word thx so far On 10 Nov., 02:11, "Xavier Mathews" <[EMAIL PROTECTED]> wrote: > What they said lol. If you find your self bugging with the date dont > use it w

Re: bug? or whats the matter with date fields?

2008-11-09 Thread Xavier Mathews
What they said lol. If you find your self bugging with the date dont use it without debugging. On 11/09/2008, Dardo Sordi Bogado <[EMAIL PROTECTED]> wrote: > > Avoid naming a field the same as the model and this will not happen ;) > > On Sun, Nov 9, 2008 at 8:03 PM, Mark (Germany) > <[EMAIL PROTE

Re: bug? or whats the matter with date fields?

2008-11-09 Thread Dardo Sordi Bogado
Avoid naming a field the same as the model and this will not happen ;) On Sun, Nov 9, 2008 at 8:03 PM, Mark (Germany) <[EMAIL PROTECTED]> wrote: > > As the pr() output shows, the processed form data on POST > returns a devided array with the normal "Date" and a second "date" > resulting in 2 warn

Re: bug? or whats the matter with date fields?

2008-11-09 Thread villas
Having had a tough time in the past with this kind of problem, I would instinctively try to avoid using typical reserved words such as 'date'. These kinds of issues are notoriously difficult to resolve, and tend to crop up again later. I appreciate this is not an answer to the question, but cou

bug? or whats the matter with date fields?

2008-11-09 Thread Mark (Germany)
As the pr() output shows, the processed form data on POST returns a devided array with the normal "Date" and a second "date" resulting in 2 warnings (Undefined variable: month/year) + the form process recognized as invalide. Array ( [Date] => Array ( [user_id] => 1

Re: Form type='get' and date fields

2008-09-22 Thread RichardAtHome
, the URL looks like this: > > >http://www.example.com/events/search?event_name=&location_name=&start... > > > Which makes it impossible to work out the date that was submitted > > because the last query parameter overwrites the previous ones! > > > $this->pa

Re: Form type='get' and date fields

2008-09-22 Thread Daniel Hofstetter
hat was submitted > because the last query parameter overwrites the previous ones! > > $this->params['url']: > >             [url] => events/search >             [start_date] => pm > > If I use 'post' as the form type, Cake separates the date fields > correc

Re: Form type='get' and date fields

2008-09-22 Thread RichardAtHome
ery parameter overwrites the previous ones! > > $this->params['url']: > >             [url] => events/search >             [start_date] => pm > > If I use 'post' as the form type, Cake separates the date fields > correctly, but the search result

Form type='get' and date fields

2008-09-22 Thread RichardAtHome
date that was submitted because the last query parameter overwrites the previous ones! $this->params['url']: [url] => events/search [start_date] => pm If I use 'post' as the form type, Cake separates the date fields correctly, but the search r

Re: 2 basic Problems - Validation and Date Fields

2007-09-17 Thread cronet
thanks for reply. > try: $this->cleanUpFields('ListEvents') ; This throws an Error cause my Model Name is 'ListEvent'. If i use my model name, there's no effect on the date problem. I still need to do it manually :/ On 16 Sep., 20:51, dardosordi <[EMAIL PROTECTED]> wrote: > $this->cleanUpFields

Re: 2 basic Problems - Validation and Date Fields

2007-09-16 Thread dardosordi
$this->cleanUpFields() should work, if not you must put a ticket in trac.cakephp.org . On Sep 14, 4:05 pm, cronet <[EMAIL PROTECTED]> wrote: > Hi there, > > i get rid of simple things... (Things which worked already)... I could > bang my head to the wall !! > My first cake app, and i'm very impre

2 basic Problems - Validation and Date Fields

2007-09-14 Thread cronet
Hi there, i get rid of simple things... (Things which worked already)... I could bang my head to the wall !! My first cake app, and i'm very impressed by cakephp. Tow basic things won't work for me: I think i'm doing all right, but the automagic of validating fields and throwing an error won't

1.2 using scaffolding, problem with date fields in view

2007-05-28 Thread [EMAIL PROTECTED]
Hi All, Probably a basic question, but I could not find anything in the archives nor on google. I am using scaffolding with a model that has some date fields in the database. Using 1.1 it displayed a '-00-00' date in the db as an 'empty' date. But now, using 1.2, it per