Solved

How to enter Hours/Minutes for Custom field of type DateTime?

  • 4 December 2023
  • 4 replies
  • 105 views

Userlevel 3
Badge

Dear Team,

I want to create a new Custom field of type DateTime that can input Date and Hours/Minutes.

 

 

Please help me the solution !

 

Best Regards,

NNT

icon

Best answer by aaghaei 4 December 2023, 10:02

View original

4 replies

Userlevel 7
Badge +8

public abstract class date : PX.Data.BQL.BqlDateTime.Field<date> { }[PXDBDateAndTime(DisplayNameDate = "Date", DisplayNameTime = "Time", UseTimeZone = true)]
[PXUIField(DisplayName = "Date")]

public virtual DateTime? Date { get; set; }

Userlevel 3
Badge

Hi @aaghaei,

I have performed customization as you instructed but the results only display the Date. Cannot enter Time.

 

Best Regards,

NNT

Userlevel 7
Badge +8

If you are using form then have a loot at the below

 

<px:PXTimeSpan DataField="Time" runat="server" ID="edtime" SummaryMode="true" InputMask="hh:mm" Width="100" ></px:PXTimeSpan>

 

If you are using grid then add from the data fields and it should come something like 

 

<px:PXGridColumn DataField="Date_Time" CommitChanges="true" ></px:PXGridColumn>

Userlevel 7
Badge +8

A friendly advise. I underestand people like to be productive and get the things done but always is a good idea to read through the materials or watch the videos to learn doing the work the right way. I bet you would get answer for all your questions in the materials.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved