Yii Framework Forum: Kartik-V DateControl - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Kartik-V DateControl Rate Topic: -----

#1 User is offline   alzambo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 12-April 15

Posted 24 April 2015 - 01:51 AM

Hi,

i'm stucked with the datecontrol and datepicker in a ActiveForm.
Following the instructions I get a php error PHP Fatal error: Class 'kartik\\datecontrol\\Module' not found in /var/www/html/alex/config/params.php on line 9


This is my params.php file
<?php
use kartik\datecontrol\Module;

return [
    'adminEmail' => 'admin@example.com',

      // format settings for displaying each date attribute (ICU format example)
    'dateControlDisplay' => [
        Module::FORMAT_DATE => 'dd-MM-yyyy',
        Module::FORMAT_TIME => 'HH:mm:ss a',
        Module::FORMAT_DATETIME => 'dd-MM-yyyy HH:mm:ss a', 
    ],
    
    // format settings for saving each date attribute (PHP format example)
    'dateControlSave' => [
        Module::FORMAT_DATE => 'php:U', // saves as unix timestamp
        Module::FORMAT_TIME => 'php:H:i:s',
        Module::FORMAT_DATETIME => 'php:Y-m-d H:i:s',
    ]
];


on params.php
0

#2 User is offline   tgrafen1 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 16-July 15

Posted 16 July 2015 - 06:45 AM

Hello, I have the same error here,
i followed the instructions in a youtube video and yeah i have the same error.

Class 'kartik\datecontrol\Module' not found in C:\xampp\htdocs\yiicomm\common\config\params.php on line 6

and here is my file:

<?php
use kartik\datecontrol\Module;
return [
// format settings for displaying each date attribute
'dateControlDisplay' => [
Module::FORMAT_DATE => 'M-d-Y',
Module::FORMAT_TIME => 'H:i:s A',
Module::FORMAT_DATETIME => 'M-d-Y H:i:s A',
],

// format settings for saving each date attribute
'dateControlSave' => [
Module::FORMAT_DATE => 'U',
Module::FORMAT_TIME => 'U',
Module::FORMAT_DATETIME => 'U',
],
'adminEmail' => 'admin@example.com',
'supportEmail' => 'support@example.com',
'user.passwordResetTokenExpire' => 3600,
];
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users