Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

get date and display (asp.net and javascript)

Featured Replies

Hi,

 

I have a an event form where users enter what, where and when (with js datepicker).

 

when is from and to form fields. the user doesnt have to enter the when and if its empty the search defaults to the next 3 months from today. I want to do the following:

 

by default i want to show in the from form field the word 'today'

im using

value="Today!" onfocus="if(this.value == 'Today!') this.value=''" onblur="if(this.value == '') this.value='Today!'"

 

in the to form field i want to show the date 3 months from today based on the server date. i have found the following snippet to create a button with the server date and time (i dont need time) but i dont know what to do...

 

void Page_Load(object sender, EventArgs e) {

Button1.Value = DateTime.Now.ToString();

}

 

So, to get the date 3 months from now and display it like above, how do i do it?

may you post your html code... I didn't understand too much the structure of the form and what you want to get...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.