locked
Customize the Date time Range field value of a sharepoint List RRS feed

  • Question

  • Hello All,

     

    I have a requirement where I nned to customize the Range of Date time field value of a sharepoint List from 12AM,1AM,etc.

    How can I chnage thse values. I obsered that these are present on the FldNew.aspx page in the Layouts folders.

    Please anyone shed some light on this.

    Thank You
    Smith


    smith
    Friday, July 8, 2011 7:26 PM

Answers

All replies

  • Hi Smith,

     

    From your description, I understand  that you want to modify the range of date time field(Like enable time from 1AM to 10AM), if I have any misunderstanding, please feel free to let me know.

     

    If so, you will not realize it according to modify the FldNew.aspx page. The FldNew.aspx is not containing the definition of date/time field.

     

    If you need the list items in a specific range of time, you can use javascript code in the pages that need to verify the time, to see whether the time is in the needed scope.

     

    Thanks,

          Qiao Wei
    Tuesday, July 12, 2011 1:16 AM
    Moderator
  • Hello Qiao Wei,

     

    Thank you for your response. Yes I want to modify the range of the date time field. Can you please elaborate on where to use Javascript and how.

    I appreciate your response.

     

    Thank you

    Smith


    smith
    Tuesday, July 12, 2011 3:56 PM
  • Hi Smith,

    Thanks for posting back and sorry for my late reply.

    As there isn’t a direct way to range the datetime field, in my opinion, you can do some validation when new or edit a list item.

    To do this, you can add some javascript code to the NewForm.aspx /EditForm.aspx page.

    Here is an example about “SharePoint Forms date validation using JavaScript”, you can reference from it and modify it to meet your special needs, for more information, please refer to:

    http://sharepointapplied.com/2009/01/08/sharepoint-forms-date-validation-using-javascript/

    Thanks,

    Qiao Wei


    Friday, July 15, 2011 11:41 AM
    Moderator
  • Hello Qiao,

     

    Thank you for the response. I will try to implement based on this pointer.

     

    Thank you

    smith


    smith
    Monday, July 18, 2011 3:22 PM