I need to create customer custom attribute as datetime in magento 2.3
Below is my code into Setup/Patch/Data/AddLastPasswordChangeCustomerAttribute.php with apply() funcation
public function apply()
{
$this->moduleDataSetup->getConnection()->startSetup();
/** @var EavSetup $eavSetup */
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
$eavSetup->addAttribute(
\Magento\Customer\Model\Customer::ENTITY,
'last_password_change',
[
'type' => 'varchar',
'label' => 'last_password_change',
'input' => 'text',
'source' => '',
'frontend' => '',
'required' => false,
'backend' => '',
'default' => null,
'user_defined' => true,
'unique' => false,
'group' => 'General',
]
);
$this->moduleDataSetup->getConnection()->endSetup();
}
Also i need to display that attribute in admin side in customer account information.
I have tried but it's not display at customer account information in admin side.